/* Refactor utilities for shared layout/style parity */

.app-header-64 {
    height: 64px;
    min-height: 64px;
}

.app-nav-64 {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.app-brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.app-nav-actions-shrink {
    flex-shrink: 0;
}

.app-main-64 {
    margin-top: 64px !important;
    height: calc(100vh - 64px) !important;
    overflow: hidden !important;
}

.app-sidebar-scroll {
    overflow-y: auto;
}

.app-panel-pad {
    padding: 10px;
}

.app-output-title {
    position: absolute;
    top: 20px;
    left: 20px;
    color: var(--text-dim);
    font-size: 1rem;
}

.app-credit-text {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 10px;
    white-space: nowrap;
}

.app-link-reset {
    text-decoration: none;
}

.app-btn-mt-8 {
    margin-top: 8px;
}

.app-justify-center {
    justify-content: center;
}

.app-z-10001 {
    z-index: 10001;
}

.app-z-10002 {
    z-index: 10002;
}

.app-z-10003 {
    z-index: 10003;
}

.qe-sidebar-actions-end {
    display: flex;
    justify-content: flex-end;
}

.qe-danger-border {
    border-color: rgba(239, 68, 68, 0.3);
}

.is-hidden {
    display: none;
}

.w-full {
    width: 100%;
}

.nav-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.2s;
}

.main-content-pad-lg {
    padding-top: 120px;
    padding-bottom: 60px;
}

.text-dim {
    color: var(--text-dim);
}

.u-hidden {
    display: none;
}

.u-flex-1 {
    flex: 1;
}

.u-pos-rel {
    position: relative;
}

.u-credit-mobile {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 8px;
}

.u-download-btn-desktop {
    display: none;
    padding: 8px 16px;
    height: auto;
    margin-left: 10px;
    align-items: center;
    gap: 6px;
}

.u-download-btn-mobile {
    display: none;
    padding: 8px;
    height: auto;
    margin-right: 8px;
}

.u-download-fab-mobile {
    display: none;
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    padding: 8px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.u-upload-btn-compact {
    height: 42px;
    width: auto;
    padding: 0 12px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.u-modal-hidden {
    display: none;
}

.u-hidden-mt8 {
    display: none;
    margin-top: 8px;
}

.u-icon-hidden {
    display: none;
}

.tg-credit-desktop-text {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 8px;
    text-align: center;
}

.tg-credit-flex {
    flex: 1;
}

.tg-tutorial-note {
    margin-top: 15px;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.u-row-between-end {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    margin-bottom: 8px;
}

.u-row-gap-8-center {
    display: flex;
    gap: 8px;
    align-items: center;
}

.u-row-gap-10-center {
    display: flex;
    gap: 10px;
    align-items: center;
}

.u-flex-1-item {
    flex: 1;
}

.u-strength-box {
    width: 90px;
    flex: 0 0 90px;
}

.u-res-width-80 {
    width: 80px;
}

.u-text-center-input {
    width: 100%;
    text-align: center;
}

.u-text-center-input-pad0 {
    width: 100%;
    text-align: center;
    padding: 0;
}

.u-res-sep-dim {
    color: var(--text-dim);
}

.mb-head-spacing {
    margin-bottom: 8px;
}

.u-m0 {
    margin: 0;
}

.u-label-strength {
    margin: 0;
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    width: 90px;
    flex: 0 0 90px;
}

.u-float-right-dim-sm {
    float: right;
    color: var(--text-dim);
    font-size: 0.8rem;
}

.u-layer-title {
    margin: 0;
    color: var(--text-dim);
    font-size: 1rem;
}

.u-mobile-credits-row {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 8px;
    flex: 1;
}

.u-mobile-sliders-wrap {
    margin-top: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
}

.u-flex-fixed-auto {
    flex: 0 0 auto;
}

.u-label-xs-row {
    font-size: 10px;
    display: flex;
    justify-content: space-between;
}

.u-label-xs {
    font-size: 10px;
}

.u-opacity-05 {
    opacity: 0.5;
}

.u-opacity-03 {
    opacity: 0.3;
}

.u-download-fab-mobile-right70 {
    display: none;
    position: absolute;
    top: 12px;
    right: 70px;
    z-index: 100;
    padding: 8px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.u-print-fab-mobile {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    padding: 8px;
    height: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.u-print-btn-desktop {
    display: none;
    padding: 8px 16px;
    height: auto;
    margin-left: 6px;
    align-items: center;
    gap: 6px;
}

.u-mt-8 {
    margin-top: 8px;
}

.u-mt-10 {
    margin-top: 10px;
}

.u-margin-btn-stencil {
    margin-top: 0;
    margin-bottom: 6px;
}

.u-text-center {
    text-align: center;
}

.u-text-center-dim {
    text-align: center;
    color: var(--text-dim);
}

.u-highlight-card {
    border-color: var(--purple-main);
    box-shadow: 0 0 20px var(--purple-glow);
}

.u-price-note {
    font-size: 1rem;
    color: var(--text-dim);
}

.u-my16-dim {
    margin: 16px 0;
    color: var(--text-dim);
}

.u-center-mt40 {
    text-align: center;
    margin-top: 40px;
}

.u-cta-lg {
    padding: 16px 40px;
    font-size: 1.2rem;
}

.u-center-stack-gap10 {
    text-align: center;
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.u-error-red-hidden {
    color: #ff4444;
    display: none;
}

.u-tutorial-info {
    margin-top: var(--space-4);
    color: var(--text-dim);
}

.u-tutorial-title {
    color: var(--text-main);
    margin-bottom: var(--space-2);
}

/* Shared phone portrait header/back-button behavior across editor pages. */
@media (max-width: 767px) and (orientation: portrait) {
    .nav-container {
        position: relative !important;
    }

    .btn-mobile-back {
        display: flex !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        padding: 8px !important;
        color: var(--neon-green) !important;
    }

    .btn-mobile-back svg {
        width: 18px;
        height: 18px;
    }

    .nav-container > div:first-child {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    .brand {
        display: inline !important;
    }

    .nav-container .brand + span {
        border-left: none !important;
        padding-left: 0 !important;
    }
}
