.social-image-resizer-page {
    --ir-brand: #6254e8;
    --ir-brand-dark: #5143d7;
    --ir-ink: #20213a;
    --ir-muted: #70738b;
    --ir-border: #e7e8f0;
    --ir-soft: #f7f7fc;
    color: var(--ir-ink);
}

.social-image-resizer-page [hidden] {
    display: none !important;
}

.ir-hero {
    padding: 54px 0 38px;
    background: radial-gradient(circle at 80% 20%, rgba(98, 84, 232, .10), transparent 27%), #fbfaff;
    text-align: center;
}

.ir-hero__inner {
    max-width: 810px;
    margin: 0 auto;
}

.ir-eyebrow,
.ir-preview-panel__label {
    display: inline-block;
    color: var(--ir-brand);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    line-height: 1.4;
    text-transform: uppercase;
}

.ir-hero h1 {
    margin: 13px 0 14px;
    color: var(--ir-ink);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.08;
}

.ir-hero p {
    max-width: 690px;
    margin: 0 auto;
    color: var(--ir-muted);
    font-size: 17px;
    line-height: 1.7;
}

.ir-hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    margin-top: 24px;
    padding: 0 22px;
    border-radius: 9px;
    background: var(--ir-brand);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
}

.ir-hero__cta:hover {
    transform: translateY(-1px);
    background: var(--ir-brand-dark);
    color: #fff;
}

.ir-tool-section {
    padding: 24px 0 76px;
    background: #fbfaff;
}

.ir-tool {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
    overflow: hidden;
    border: 1px solid var(--ir-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(34, 28, 89, .08);
}

.ir-tool__controls {
    padding: 34px;
}

.ir-section-heading {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 23px;
}

.ir-section-heading--compact {
    margin: 0 0 17px;
}

.ir-step {
    display: inline-flex;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: #f0efff;
    color: var(--ir-brand);
    font-size: 11px;
    font-weight: 800;
}

.ir-section-heading h2,
.ir-preview-panel h2 {
    margin: 0 0 5px;
    color: var(--ir-ink);
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -.015em;
}

.ir-section-heading p {
    margin: 0;
    color: var(--ir-muted);
    font-size: 13px;
    line-height: 1.55;
}

.ir-upload {
    position: relative;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 1.5px dashed #c7c3f4;
    border-radius: 13px;
    background: #faf9ff;
    cursor: pointer;
    text-align: center;
    transition: border-color .18s ease, background .18s ease;
}

.ir-upload:hover,
.ir-upload.is-dragging {
    border-color: var(--ir-brand);
    background: #f4f2ff;
}

.ir-upload input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.ir-upload:focus-within {
    outline: 3px solid rgba(98, 84, 232, .23);
    outline-offset: 3px;
}

.ir-upload__icon,
.ir-preview__empty-icon {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 13px;
    background: #eeecff;
    color: var(--ir-brand);
}

.ir-upload__icon svg,
.ir-preview__empty-icon svg,
.ir-privacy svg,
.ir-download svg,
.ir-file-info__icon svg,
.ir-file-remove svg {
    display: block;
    width: 21px;
    height: 21px;
}

.ir-upload__title {
    color: var(--ir-ink);
    font-size: 14px;
    font-weight: 750;
}

.ir-upload__browse {
    margin-top: 5px;
    color: var(--ir-brand);
    font-size: 13px;
    font-weight: 700;
}

.ir-upload__hint {
    margin-top: 13px;
    color: #888ba0;
    font-size: 11px;
}

.ir-privacy {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 13px 0 22px;
    color: var(--ir-muted);
    font-size: 11px;
    line-height: 1.5;
}

.ir-privacy svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    color: #78806d;
}

.ir-file-info {
    display: flex;
    gap: 11px;
    align-items: center;
    margin: -3px 0 25px;
    padding: 11px 12px;
    border: 1px solid var(--ir-border);
    border-radius: 10px;
    background: #fff;
}

.ir-file-info__icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #f2f1ff;
    color: var(--ir-brand);
}

.ir-file-info__icon svg {
    width: 18px;
    height: 18px;
}

.ir-file-info__text {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.ir-file-info__text strong {
    overflow: hidden;
    color: var(--ir-ink);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ir-file-info__text small {
    color: var(--ir-muted);
    font-size: 11px;
}

.ir-file-remove {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8c8ea0;
    cursor: pointer;
}

.ir-file-remove:hover {
    background: #f3f3f8;
    color: #34354d;
}

.ir-file-remove svg {
    width: 17px;
    height: 17px;
}

.ir-formats {
    margin-top: 4px;
}

.ir-presets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 24px;
}

.ir-preset {
    display: flex;
    min-height: 64px;
    gap: 11px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid var(--ir-border);
    border-radius: 10px;
    background: #fff;
    color: var(--ir-ink);
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.ir-preset:hover {
    border-color: #c4bef7;
}

.ir-preset.is-active {
    border-color: var(--ir-brand);
    background: #f8f7ff;
    box-shadow: 0 0 0 2px rgba(98, 84, 232, .08);
}

.ir-preset__shape {
    display: inline-block;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border: 1.7px solid #9991e9;
    border-radius: 5px;
}

.ir-preset__shape--portrait {
    width: 21px;
    height: 28px;
    flex-basis: 21px;
    margin: 0 3px;
}

.ir-preset__shape--story {
    width: 18px;
    height: 28px;
    flex-basis: 18px;
    margin: 0 4px;
    border-radius: 5px;
}

.ir-preset__shape--landscape {
    width: 31px;
    height: 18px;
    flex-basis: 31px;
    margin: 0 -2px;
}

.ir-preset__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.ir-preset__copy strong {
    font-size: 12px;
    font-weight: 750;
}

.ir-preset__copy small {
    color: var(--ir-muted);
    font-size: 10px;
}

.ir-crop-controls {
    padding-top: 3px;
}

.ir-range-label {
    display: flex;
    justify-content: space-between;
    margin: 0 0 8px;
    color: #494b61;
    font-size: 12px;
    font-weight: 700;
}

.ir-range-label output {
    color: var(--ir-brand);
    font-variant-numeric: tabular-nums;
}

.ir-range {
    display: block;
    width: 100%;
    height: 5px;
    margin: 0;
    border-radius: 999px;
    accent-color: var(--ir-brand);
    cursor: pointer;
}

.ir-drag-hint {
    margin: 8px 0 18px;
    color: #8a8ca0;
    font-size: 11px;
}

.ir-export-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(125px, .8fr);
    gap: 12px;
    align-items: center;
    margin: 16px 0;
}

.ir-export-settings label {
    color: #494b61;
    font-size: 12px;
    font-weight: 700;
}

.ir-select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid var(--ir-border);
    border-radius: 8px;
    background: #fff;
    color: var(--ir-ink);
    font: inherit;
    font-size: 12px;
}

.ir-quality {
    margin: 3px 0 18px;
}

.ir-download {
    display: flex;
    width: 100%;
    min-height: 46px;
    gap: 9px;
    align-items: center;
    justify-content: center;
    margin-top: 21px;
    border: 0;
    border-radius: 9px;
    background: var(--ir-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
    transition: background .16s ease, opacity .16s ease;
}

.ir-download:hover:not(:disabled) {
    background: var(--ir-brand-dark);
}

.ir-download:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.ir-download svg {
    width: 18px;
    height: 18px;
}

.ir-status,
.ir-error {
    min-height: 18px;
    margin-top: 9px;
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.ir-status {
    color: #4c735a;
}

.ir-error {
    color: #be3646;
}

.ir-preview-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 34px;
    border-left: 1px solid var(--ir-border);
    background: #f7f7fb;
}

.ir-preview-panel__top {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 19px;
}

.ir-preview-panel__label {
    margin-bottom: 6px;
    font-size: 10px;
}

.ir-preview-panel h2 {
    margin: 0;
    font-size: 17px;
}

.ir-dimension-badge {
    padding: 7px 9px;
    border: 1px solid #e4e2f3;
    border-radius: 7px;
    background: #fff;
    color: #686a7e;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.ir-preview {
    display: flex;
    min-height: 360px;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 18px;
    border: 1px solid #e6e6ee;
    border-radius: 12px;
    background-color: #fff;
    background-image: linear-gradient(45deg, #f1f1f6 25%, transparent 25%), linear-gradient(-45deg, #f1f1f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f1f1f6 75%), linear-gradient(-45deg, transparent 75%, #f1f1f6 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.ir-preview__empty {
    max-width: 230px;
    color: #8b8da0;
    text-align: center;
}

.ir-preview__empty-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 12px;
    border-radius: 16px;
}

.ir-preview__empty-icon svg {
    width: 25px;
    height: 25px;
}

.ir-preview__empty p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

#irCanvas {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 510px;
    height: auto;
    border-radius: 3px;
    touch-action: none;
    user-select: none;
}

#irCanvas.is-draggable {
    cursor: grab;
}

#irCanvas.is-dragging {
    cursor: grabbing;
}

.ir-preview-caption {
    min-height: 17px;
    margin: 12px 0 0;
    color: #86889a;
    font-size: 10px;
    text-align: center;
}

.ir-content-section {
    padding: 72px 0 86px;
    background: #fff;
}

.ir-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    gap: 54px;
    align-items: start;
}

.ir-size-guide h2,
.ir-howto h2,
.ir-faq h2 {
    margin: 10px 0 11px;
    color: var(--ir-ink);
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.2;
}

.ir-size-guide > p,
.ir-howto > p {
    margin: 0 0 20px;
    color: var(--ir-muted);
    font-size: 14px;
    line-height: 1.7;
}

.ir-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ir-border);
    border-radius: 11px;
}

.ir-size-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ir-size-table th,
.ir-size-table td {
    padding: 13px 15px;
    border-bottom: 1px solid #eeeff4;
    color: #56596e;
    font-size: 12px;
    text-align: left;
}

.ir-size-table th {
    background: #f8f8fc;
    color: #7a7c8e;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ir-size-table tr:last-child td {
    border-bottom: 0;
}

.ir-size-table td strong {
    color: var(--ir-ink);
    white-space: nowrap;
}

.ir-size-note {
    margin: 13px 0 0;
    color: #85879a;
    font-size: 11px;
    line-height: 1.6;
}

.ir-howto {
    padding: 29px;
    border: 1px solid var(--ir-border);
    border-radius: 14px;
    background: #fafaff;
}

.ir-howto ol {
    display: grid;
    gap: 13px;
    margin: 23px 0 25px;
    padding-left: 23px;
    color: #5f6174;
    font-size: 13px;
    line-height: 1.65;
}

.ir-howto li {
    padding-left: 4px;
}

.ir-howto li::marker {
    color: var(--ir-brand);
    font-weight: 800;
}

.ir-local-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    padding: 13px;
    border-radius: 9px;
    background: #f0f6f0;
    color: #58775a;
    font-size: 11px;
    line-height: 1.55;
}

.ir-local-note span {
    font-size: 14px;
    font-weight: 900;
}

.ir-faq {
    display: grid;
    grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
    gap: 50px;
    margin-top: 76px;
    padding-top: 55px;
    border-top: 1px solid var(--ir-border);
}

.ir-faq__list {
    display: grid;
    gap: 8px;
}

.ir-faq details {
    padding: 15px 17px;
    border: 1px solid var(--ir-border);
    border-radius: 10px;
    background: #fff;
}

.ir-faq summary {
    color: var(--ir-ink);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.ir-faq details p {
    margin: 11px 0 0;
    color: var(--ir-muted);
    font-size: 12px;
    line-height: 1.7;
}

.ir-platform-links {
    margin-top: 34px;
    padding: 24px;
    border: 1px solid var(--ir-border);
    border-radius: 14px;
    background: #fff;
}

.ir-platform-links h2 {
    margin: 0 0 16px;
    color: var(--ir-ink);
    font-size: 19px;
    font-weight: 750;
}

.ir-platform-links__list {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.ir-platform-links__list a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border: 1px solid var(--ir-border);
    border-radius: 999px;
    color: var(--ir-ink);
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.ir-platform-links__list a:hover {
    border-color: var(--ir-brand);
    color: var(--ir-brand);
}

@media (max-width: 991px) {
    .ir-tool {
        grid-template-columns: 1fr;
    }

    .ir-preview-panel {
        min-height: 520px;
        border-top: 1px solid var(--ir-border);
        border-left: 0;
    }

    .ir-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .ir-howto {
        padding: 24px;
    }

    .ir-faq {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-top: 55px;
        padding-top: 42px;
    }
}

@media (max-width: 575px) {
    .ir-hero {
        padding: 40px 0 26px;
    }

    .ir-hero p {
        font-size: 15px;
    }

    .ir-tool-section {
        padding: 15px 0 54px;
    }

    .ir-tool__controls,
    .ir-preview-panel {
        padding: 22px 17px;
    }

    .ir-presets {
        gap: 7px;
    }

    .ir-preset {
        min-height: 61px;
        gap: 7px;
        padding: 8px;
    }

    .ir-preset__copy strong {
        font-size: 11px;
    }

    .ir-preset__copy small {
        font-size: 9px;
    }

    .ir-preview-panel__top {
        align-items: flex-start;
    }

    .ir-preview {
        min-height: 280px;
        padding: 12px;
    }

    #irCanvas {
        max-height: 420px;
    }

    .ir-content-section {
        padding: 52px 0 65px;
    }

    .ir-size-table th,
    .ir-size-table td {
        padding: 11px;
        font-size: 11px;
    }
}
