
.qr-style-diamond {
    transform: rotate(45deg) scale(.84);
}

.qr-style-soft {
    opacity: .82;
    border-radius: 10px;
}

.qr-frame-sample {
    width: 42px;
    height: 30px;
    display: block;
    border: 3px solid #111827;
    border-radius: 5px;
    background: #fff;
    box-shadow: inset 0 0 0 8px rgba(17, 24, 39, .05);
}

.qr-frame-rounded {
    border-radius: 14px;
}

.qr-frame-double {
    border-style: double;
    border-width: 5px;
}

.qr-frame-dash {
    border-style: dashed;
}

.qr-frame-badge {
    border-color: #df5038;
    border-bottom-width: 7px;
    box-shadow: 0 5px 10px rgba(31, 41, 55, .16);
}

.qr-options-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.qr-caption-grid,
.qr-logo-grid,
.qr-bg-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 12px;
}

.qr-logo-grid,
.qr-bg-grid {
    grid-template-columns: 1.4fr 1fr auto;
    align-items: end;
}

.qr-options-grid label,
.qr-caption-grid label,
.qr-logo-grid label,
.qr-bg-grid label {
    display: grid;
    gap: 7px;
    color: #4d5868;
    font-weight: 700;
}

.qr-caption-check {
    align-self: end;
    min-height: 46px;
}

.qr-file-field {
    min-width: 0;
}

.qr-file-title {
    color: #4d5868;
    font-weight: 700;
}

.qr-file-picker {
    position: relative;
    min-width: 0;
    min-height: 46px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    color: #273247;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.qr-file-picker:hover,
.qr-file-field:focus-within .qr-file-picker {
    border-color: rgba(37, 111, 217, .45);
    box-shadow: 0 8px 18px rgba(37, 111, 217, .12);
}

.qr-file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.qr-file-icon {
    width: 48px;
    height: 100%;
    min-height: 46px;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: #edf5ff;
    border-right: 1px solid #d9e0e8;
}

.qr-file-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qr-file-text {
    min-width: 0;
    padding: 0 12px;
    color: #273247;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 760;
}

.qr-file-field.has-file .qr-file-picker {
    border-color: rgba(37, 111, 217, .34);
    background: #f8fbff;
}

.qr-file-field.has-file .qr-file-icon {
    color: #fff;
    background: var(--primary);
}

.qr-caption-grid .font-picker-list {
    left: auto;
    right: 0;
    width: min(370px, calc(100vw - 32px));
    max-height: min(390px, 62vh);
    padding: 10px;
    gap: 8px;
}

.qr-caption-grid .font-picker-option {
    min-height: 78px;
    padding: 11px 13px;
}

.qr-caption-grid .font-picker-option-name {
    font-size: 15px;
}

.qr-caption-grid .font-picker-option-sample {
    font-size: 30px;
}

.qr-logo-clear {
    min-height: 46px;
    padding: 9px 13px;
    color: #4d5868;
    background: #edf2f7;
    box-shadow: none;
}

.qr-logo-clear:hover {
    color: #fff;
    background: #df5038;
}

.qr-local-note {
    margin: -2px 0 0;
}

.qr-submit {
    width: fit-content;
    min-width: 210px;
    margin: 10px auto 0;
    color: #fff;
    background: #cbbdb9;
    border-radius: 999px;
    box-shadow: none;
}

.qr-submit:hover {
    background: #df5038;
}

.qr-error {
    margin: 0;
    padding: 10px 12px;
    color: #b42318;
    background: #fff1f1;
    border-radius: 8px;
    font-weight: 700;
}

.qr-output-card {
    padding: 18px;
    display: grid;
    gap: 14px;
}

.qr-canvas-wrap {
    min-height: 330px;
    padding: 14px;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 14px;
}

.qr-placeholder {
    min-height: 286px;
    padding: 22px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #7a8494;
    text-align: center;
    background:
        linear-gradient(90deg, rgba(37,111,217,.08) 1px, transparent 1px),
        linear-gradient(rgba(37,111,217,.08) 1px, transparent 1px),
        #f8fafc;
    background-size: 24px 24px;
    border: 1px dashed #cbd8e6;
    border-radius: 12px;
}

.qr-placeholder svg {
    width: 68px;
    height: 68px;
    color: #9fb1c6;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qr-placeholder strong {
    color: #354158;
    font-family: var(--font-heading);
    font-size: 18px;
}

.qr-placeholder span {
    max-width: 260px;
    font-size: 14px;
}

#qrCanvas {
    width: min(100%, 320px);
    height: auto;
    display: block;
}

.qr-output-card:not(.is-ready) #qrCanvas,
.qr-output-card:not(.is-ready) .qr-output-actions,
.qr-output-card:not(.is-ready) #qrPayloadPreview {
    display: none;
}

.qr-output-card.is-ready .qr-placeholder {
    display: none;
}

.qr-output-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.qr-output-actions a,
.qr-output-actions button {
    min-height: 40px;
    padding: 9px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 15px;
    text-align: center;
    text-decoration: none;
}

.qr-output-actions button {
    background: #354158;
}

.qr-output-actions .qr-save-profile {
    grid-column: 1 / -1;
    gap: 7px;
    background: #13a67a;
}

.qr-output-actions .qr-save-profile svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#qrPayloadPreview {
    min-height: 96px;
    padding: 10px;
    color: #4d5868;
    background: #f8fafc;
    font-size: 13px;
    resize: vertical;
}

.frame-overview-main {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 18px 24px 30px;
}

.frame-overview-hero {
    min-height: 170px;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(120deg, rgba(37, 111, 217, .72), rgba(30, 95, 174, .56)),
        url('../img/center-bg.jpg') center / cover;
    color: #fff;
    box-shadow: var(--shadow);
}

.frame-overview-hero h1 {
    margin: 0 0 8px;
    font-family: var(--font-title);
    font-size: clamp(20px, 3vw, 3rem);
    font-weight: 400;
    line-height: 1.05;
}

.frame-overview-hero p {
    max-width: 660px;
    margin: 0;
    color: rgba(255,255,255,.88);
    font-size: 1.02rem;
}

.frame-overview-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(86px, 1fr));
    gap: 10px;
}

.frame-overview-stats div {
    min-width: 86px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: var(--radius);
    background: rgba(255,255,255,.12);
    text-align: center;
    backdrop-filter: blur(12px);
}

.frame-overview-stats strong,
.frame-overview-stats span {
    display: block;
}

.frame-overview-stats strong {
    font-size: 1.5rem;
}

.frame-overview-stats span {
    color: rgba(255,255,255,.78);
    font-size: .84rem;
    font-weight: 750;
}

.overview-feature-blocks {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.overview-feature-block,
.overview-category-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.overview-feature-block {
    padding: 14px;
}

.overview-feature-block header,
.overview-category-header,
.overview-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.overview-block-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.overview-block-title svg {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overview-block-title h2,
.overview-section-heading h2 {
    margin: 0;
    font-size: var(--font-size-heading);
}

.overview-view-more {
    min-height: 34px;
    padding: 7px 10px;
    color: var(--primary);
    background: #eef5ff;
    box-shadow: none;
    font-size: var(--font-size-heading);
}

.overview-view-more:hover {
    color: #fff;
    background: var(--primary);
}

.overview-mini-grid,
.overview-category-grid {
    display: grid;
    gap: 10px;
}

.overview-mini-grid {
    margin-top: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.overview-category-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.overview-frame-card {
    position: relative;
    min-width: 0;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-muted);
    color: var(--text);
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.overview-frame-card:hover,
.overview-frame-card:focus-visible {
    border-color: rgba(37, 111, 217, .42);
    box-shadow: 0 10px 22px rgba(37, 111, 217, .14);
    transform: translateY(-1px);
    outline: none;
}

.overview-frame-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: contain;
    border: 1px solid #d9e3ee;
    border-radius: var(--radius);
    background: #fff;
}

.overview-use-count {
    position: absolute;
    left: 14px;
    bottom: 58px;
    z-index: 2;
    max-width: calc(100% - 58px);
    padding: 3px 6px;
    border-radius: 999px;
    color: #fff !important;
    background: rgba(18, 35, 57, .72);
    font-size: 10px !important;
    font-weight: 850;
    line-height: 1;
    pointer-events: none;
}

.overview-frame-card strong,
.overview-frame-card span {
    display: block;
    min-width: 0;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.overview-frame-card strong {
    color: #1e5fae;
    font-size: .9rem;
}

.overview-frame-card span {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.overview-frame-name {
    margin: 0 0 6px !important;
    color: #1e5fae !important;
    font-size: .86rem !important;
    font-weight: 850 !important;
    line-height: 1.15;
    text-align: center;
}

.overview-frame-card.is-compact .overview-frame-name {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 4;
    margin: 0 !important;
    padding: 4px 6px;
    border-radius: 999px;
    color: #fff !important;
    background: rgba(30, 95, 174, .92);
    box-shadow: 0 4px 12px rgba(18, 35, 57, .16);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease;
}

.overview-frame-card.is-compact:hover .overview-frame-name,
.overview-frame-card.is-compact:focus-visible .overview-frame-name {
    opacity: 1;
    transform: translateY(0);
}

.overview-copy-frame {
    width: 31px;
    height: 31px;
    min-height: 31px;
    padding: 0;
    position: absolute;
    right: 13px;
    bottom: 58px;
    z-index: 3;
    display: grid;
    place-items: center;
    color: var(--primary);
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(37, 111, 217, .18);
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(34, 44, 58, .14);
}

.overview-copy-frame:hover,
.overview-copy-frame.is-copied {
    color: #fff;
    background: var(--success);
}

.overview-copy-frame svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.overview-categories {
    margin-top: 18px;
}

.overview-section-heading {
    margin-bottom: 12px;
}

.overview-section-heading p {
    margin: 4px 0 0;
    color: var(--muted);
}

.overview-category-page-label {
    color: var(--muted);
    font-weight: 800;
}

.overview-category-card {
    margin-bottom: 16px;
    padding: 14px;
    scroll-margin-top: calc(var(--header-height) + 18px);
}

.overview-category-header {
    margin-bottom: 12px;
    padding: 9px 10px;
    border: 1px solid rgba(37, 111, 217, .12);
    border-radius: var(--radius);
    background: linear-gradient(90deg, #edf5ff, #f7fbff);
}

.overview-category-header span {
    color: var(--muted);
    font-weight: 800;
}

.overview-category-pagination,
.overview-total-pagination {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.overview-category-pagination button,
.overview-total-pagination a {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: var(--font-size-heading);
    font-weight: 800;
}

.overview-total-pagination a {
    min-width: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #fff;
    border: 1px solid var(--border);
    text-decoration: none;
}

.overview-total-pagination a.active {
    color: #fff;
    background: var(--primary);
}

.overview-list-modal .trend-dialog {
    width: min(94vw, 980px);
}

.overview-use-modal {
    position: fixed;
    inset: 0;
    z-index: 100002;
    padding: 16px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 23, 38, .46);
}

.overview-use-modal.is-open {
    display: flex;
}

.overview-use-dialog {
    width: min(96vw, 1280px);
    max-height: calc(100dvh - 32px);
    padding: 16px;
    overflow: auto;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 18px 48px rgba(10, 24, 43, .22);
}

.overview-use-header {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.overview-use-header h3 {
    margin: 0;
}

.overview-use-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 16px;
}

.overview-use-side {
    display: grid;
    align-content: start;
    gap: 10px;
}

#overviewSelectedFramePreview {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 80, 160, .12);
}

#overviewSelectedFrameName {
    max-width: 100%;
    color: #1e5fae;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-frame-note {
    margin: -2px 0 0;
    color: #111827;
    font-size: .84rem;
    font-style: italic;
    font-weight: 800;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
}

.overview-crop-side {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 560px);
    align-items: start;
    justify-content: center;
    gap: 16px;
}

.overview-crop-side.has-result {
    grid-template-columns: minmax(340px, 560px) minmax(240px, 340px);
    justify-content: start;
}

.overview-editor-pane {
    min-width: 0;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 8px;
}

.overview-editor-pane .crop-ratio-list {
    justify-content: center;
}

.overview-crop-stage {
    position: relative;
    width: min(100%, 520px) !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
}

#overviewAvatarToCrop,
#overviewFrameOverlay {
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    position: absolute;
    left: 0;
    top: 0;
}

#overviewAvatarToCrop {
    z-index: 1;
}

#overviewFrameOverlay {
    z-index: 2;
    pointer-events: none;
}

#overviewResultPreview {
    margin-top: 0;
    min-width: 0;
    padding: 12px;
    display: grid;
    align-content: start;
    justify-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fbff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}

#overviewResultPreview:empty {
    display: none;
}

#overviewResultPreview img {
    width: 100%;
    max-width: 100%;
    max-height: min(52dvh, 430px);
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(30, 80, 160, .12);
}

#overviewResultPreview a {
    min-height: 40px;
    padding: 9px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--success);
    border-radius: var(--radius);
    font-weight: 800;
    text-decoration: none;
}

.mobile-tabbar {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (min-width: 1241px) {
    .container {
        align-items: stretch;
    }

    .left,
    .home-workspace {
        height: 100%;
        align-self: stretch;
    }

    .home-workspace {
        grid-template-rows: auto minmax(0, 1fr);
        align-items: stretch;
    }

    .recommended-frame-strip {
        grid-row: 1;
    }

    .right,
    .resize-panel {
        grid-row: 2;
        height: 100%;
        min-height: 0;
    }

    .container:not(.has-recommended-frames) .right,
    .container:not(.has-recommended-frames) .resize-panel {
        grid-row: 1 / -1;
    }

}

@media (max-width: 1280px) {
    .design-frame-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .design-frame-library-grid {
        max-height: 420px;
    }

    .design-canvas-shell,
    .design-result-wrap {
        min-height: 420px;
    }
}

@media (max-width: 1240px) {
    .container {
        grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    }

    .home-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .recommended-frame-strip,
    .right,
    .resize-panel {
        grid-column: 1;
    }

}

@media (max-width: 860px) {
    :root {
        --header-height: 58px;
    }

    body {
        padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
        overscroll-behavior-y: contain;
    }

    .header-bar {
        min-height: calc(var(--header-height) + env(safe-area-inset-top));
        padding: calc(8px + env(safe-area-inset-top)) 12px 8px;
        gap: 10px;
    }

    .header-logo {
        width: 36px;
        height: 36px;
    }

    .header-title {
        max-width: 56vw;
        font-size: var(--font-size-title);
    }

    .header-menu {
        gap: 6px;
    }

    .header-menu a,
    .header-menu button {
        min-height: 36px;
        padding: 7px 9px;
        font-size: 14px;
    }

    .header-trend,
    .header-audio-tools,
    .header-utility-toggle {
        width: 42px;
        padding-inline: 9px !important;
        gap: 0;
        font-size: 0 !important;
    }

    .header-trend svg,
    .header-audio-tools > svg {
        margin: 0 !important;
    }

    .header-audio-toggle {
        width: 32px;
        min-width: 32px;
        padding-inline: 6px !important;
    }

    .header-utility-toggle > svg:first-child {
        width: 22px;
        height: 22px;
    }

    .header-utility-chevron {
        display: none;
    }

    .header-usage-alert {
        padding-inline: 9px !important;
        font-size: 12px !important;
    }

    .header-quick-logout {
        width: 36px;
        padding: 7px !important;
    }

    .header-backhome svg:not(.header-home-icon) {
        display: none;
    }

    .header-account-name {
        display: none;
    }

    .header-utility-submenu {
        right: -54px;
    }

    .header-audio-submenu {
        right: -38px;
    }

    .header-audio-submenu a,
    .header-utility-submenu a,
    .header-utility-submenu button {
        font-size: 15px;
    }

    .utility-modal {
        padding: 10px;
        align-items: flex-start;
    }

    .utility-dialog,
    .utility-dialog-wide {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 14px;
    }

    .utility-guide-modal {
        padding: 12px;
    }

    .utility-guide-dialog {
        width: min(100%, calc(100vw - 18px));
        max-height: calc(100vh - 24px);
        padding: 20px 16px;
        border-radius: 16px;
    }

    .utility-guide-grid {
        grid-template-columns: 1fr;
    }

    .utility-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .utility-canvas-box,
    .utility-image-box {
        min-height: 260px;
    }

    .utility-canvas-box canvas,
    .utility-image-box img {
        max-height: 360px;
    }

    .utility-eraser-tools,
    .utility-download-row,
    .gif-action-grid,
    .gif-resize-controls {
        grid-template-columns: minmax(0, 1fr);
    }

    .container {
        width: 100%;
        min-height: auto;
        padding: 12px;
        display: block;
    }

    .home-workspace {
        display: block;
    }

    .recommended-frame-strip {
        display: block;
    }

    .recommended-frame-window {
        margin-top: 10px;
    }

    .recommended-frame-list {
        grid-auto-columns: calc((100% - 20px) / 3);
    }

    .recommended-frame-controls {
        inset-block: 0;
    }

    .left,
    .right,
    .resize-panel,
    .cartoon-panel,
    .home-feature-panel,
    #inlineCropPanel {
        width: 100%;
        margin: 0 0 12px;
        padding: 14px;
        position: relative;
        top: auto;
        max-height: none;
        overflow: visible;
    }

    .left,
    .right,
    .resize-panel,
    #inlineCropPanel,
    #frameLibrary {
        scroll-margin-top: calc(var(--header-height) + 16px);
    }

    #frameLibrary {
        max-height: none;
        padding: 10px;
    }

    .frame-grid {
        --frame-card-size: clamp(76px, 20vw, 104px);
        gap: 9px;
        grid-template-columns: repeat(4, calc((100% - 27px) / 4));
        grid-auto-columns: calc((100% - 27px) / 4);
    }

    .right {
        min-height: 280px;
    }

    #resultPreview {
        min-height: 0;
    }

    #resultPreview img {
        max-width: 100%;
        max-height: none;
    }

    .resize-dimensions {
        grid-template-columns: 1fr 1fr;
    }

    .resize-dimensions span,
    .resize-dimensions label {
        display: none;
    }

    .resize-dimensions select,
    .resize-dimensions input {
        width: 100%;
    }

    .resize-output-settings {
        grid-template-columns: 1fr;
    }

    .cartoon-output-grid {
        grid-template-columns: 1fr;
    }

    .cartoon-style-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resize-hover-preview {
        left: 0;
        right: auto;
        transform-origin: bottom left;
    }

    .result-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: 0;
    }

    .result-actions {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .result-actions button {
        width: auto;
    }

    .result-format-field {
        flex: 1 1 110px;
    }

    .result-download-button {
        flex: 1 1 100%;
    }

    .crop-ratio-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
        max-height: none;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #inlineCropPanel .crop-stage,
    #cropModal .crop-stage {
        width: min(100%, clamp(250px, calc(100dvh - 292px), 420px)) !important;
        min-height: 0;
        max-height: none;
    }

    #cropModal {
        padding: 8px;
        align-items: center;
    }

    #cropModal > div {
        width: 100%;
        max-height: calc(100dvh - 16px);
        padding: 12px;
        gap: 7px;
    }

    .crop-help-text {
        font-size: .82rem;
    }

    .site-footer {
        padding: 0 12px 18px;
    }

    .home-logo-strip {
        padding: 0 12px 10px;
    }

    .home-welcome-modal {
        padding: 12px;
    }

    .home-welcome-dialog {
        width: min(94vw, 760px);
    }

    .home-welcome-close {
        top: -8px;
        right: -8px;
    }

    .home-logo-strip-inner {
        min-height: 78px;
    }

    .home-logo-strip-track {
        gap: 28px;
        padding: 12px 28px;
    }

    .home-logo-strip-item {
        min-width: 78px;
        height: 48px;
    }

    .home-logo-strip-item img {
        max-width: 108px;
        max-height: 48px;
    }

    .site-footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-footer nav {
        width: 100%;
        justify-content: flex-start;
    }

    .site-footer-main-nav {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .site-footer-actions,
    .site-footer-secondary-row,
    .site-footer-social {
        width: 100%;
        justify-items: start;
        justify-content: flex-start;
    }

    .site-footer-secondary-row {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 8px;
    }

    .site-footer-secondary-row .footer-about-menu {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-footer-social {
        width: auto;
        min-width: 0;
        flex: 0 1 auto;
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .site-footer-social-link {
        width: 26px;
        height: 26px;
        flex: 0 0 26px;
    }

    .site-footer-social-link svg,
    .site-footer-social-link img {
        width: 24px;
        height: 24px;
    }

    .upload-action-row,
    .frame-share-upload-row {
        grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
        align-items: stretch;
    }

    .mobile-camera-button {
        min-height: 44px;
        padding-inline: 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        color: var(--primary);
        background: #edf5ff;
        border: 1px solid rgba(37, 111, 217, .22);
        border-radius: var(--radius);
        font-family: var(--font-heading);
        font-size: 14px;
        font-weight: 800;
        white-space: nowrap;
    }

    .footer-about-submenu {
        right: auto;
        left: 0;
    }

    .utility-bill-page .header-bar {
        padding-inline: 12px;
        gap: 10px;
    }

    .utility-bill-page .header-left {
        min-width: 0;
        flex: 1 1 auto;
    }

    .utility-bill-page .header-title {
        max-width: none;
        font-size: clamp(18px, 5vw, 22px);
    }

    .utility-bill-page .header-trend,
    .utility-bill-page .header-utility-menu,
    .utility-bill-page .header-account-link {
        display: none !important;
    }

    .utility-bill-page .header-backhome {
        display: inline-flex !important;
    }

    .utility-bill-page .header-menu {
        margin-left: auto;
        flex: 0 0 auto;
        gap: 0;
    }

    .utility-bill-page .header-backhome {
        padding-inline: 9px;
        font-size: 13px !important;
    }

    .utility-bill-page .utility-bill-main {
        width: 100%;
        padding: 14px;
    }

    .utility-bill-page .utility-bill-card {
        padding: 18px;
        overflow: hidden;
    }

    .utility-bill-page .utility-bill-form input[type="file"] {
        font-size: 14px;
    }

    .utility-bill-page .site-footer {
        padding-inline: 14px;
    }

    .utility-bill-page .site-footer-inner {
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
    }

    .utility-bill-page .site-footer-brand {
        width: 100%;
        grid-template-columns: 34px minmax(0, 1fr);
        justify-content: center;
        gap: 9px;
    }

    .utility-bill-page .site-footer-logo {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .utility-bill-page .site-footer nav {
        display: none !important;
    }

    .utility-bill-page .site-footer-actions {
        width: 100%;
        justify-items: center;
    }

    .utility-bill-page .site-footer-social {
        width: auto;
        justify-content: center;
    }

    .qr-main {
        padding: 22px 14px 34px;
    }

    .qr-hero h1 {
        font-size: clamp(34px, 11vw, 52px);
    }

    .qr-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .qr-tab {
        flex: 0 0 auto;
        min-height: 42px;
        font-size: 14px;
    }

    .qr-workspace {
        grid-template-columns: 1fr;
        margin-top: 24px;
    }

    .convert-main {
        padding: 18px 14px 30px;
    }

    .convert-workspace {
        grid-template-columns: 1fr;
    }

    .convert-canvas-wrap {
        min-height: 300px;
    }

    .pdf-converter-result-list {
        min-height: 320px;
        max-height: 520px;
    }

    .qr-form-card {
        padding: 18px;
    }

    .qr-options-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qr-template-grid,
    .qr-frame-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qr-caption-grid,
    .qr-logo-grid,
    .qr-bg-grid {
        grid-template-columns: 1fr;
    }

    .qr-caption-grid .font-picker-list {
        left: 0;
        right: 0;
        width: 100%;
    }

    .trend-modal {
        padding: 12px;
        align-items: flex-start;
    }

    .trend-dialog {
        width: 100%;
        max-height: calc(100vh - 24px);
    }

    .trend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .frame-overview-main {
        padding: 12px;
    }

    .frame-overview-hero,
    .overview-section-heading,
    .overview-feature-block header,
    .overview-category-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .frame-overview-stats {
        width: 100%;
    }

    .overview-feature-blocks {
        grid-template-columns: 1fr;
    }

    .overview-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .overview-use-modal {
        padding: 10px;
        align-items: flex-start;
    }

    .overview-use-dialog {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 12px;
    }

    .overview-use-layout {
        grid-template-columns: 1fr;
    }

    .overview-crop-side,
    .overview-crop-side.has-result {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .overview-editor-pane {
        justify-items: center;
    }

    .overview-use-side {
        grid-template-columns: 120px minmax(0, 1fr);
        align-items: start;
    }

    #overviewSelectedFramePreview {
        grid-row: span 3;
    }

    .overview-crop-stage {
        width: min(100%, 420px) !important;
    }

    #overviewResultPreview {
        width: min(100%, 420px);
        justify-self: center;
    }

    .mobile-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 250;
        min-height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
        padding: 8px max(10px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        background: rgba(255,255,255,.94);
        border-top: 1px solid rgba(214, 225, 238, .95);
        box-shadow: 0 -10px 24px rgba(25, 41, 62, .12);
        backdrop-filter: blur(16px);
    }

    .mobile-tabbar a {
        min-width: 0;
        min-height: 54px;
        border-radius: var(--radius);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--muted);
        font-family: var(--font-heading);
        font-size: 12px;
        font-weight: 750;
        line-height: 1;
        text-decoration: none;
    }

    .mobile-tabbar svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-tabbar a.active {
        color: var(--primary);
        background: #edf5ff;
    }
}
