* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a1a1a;
    --primary-hover: #000000;
    --bg: #FFFFFF;
    --bg-soft: #F5F5F0;
    --border-main: #2d2d2d;
    --border-light: rgba(221, 221, 216, 0.5);
    --border-soft: rgba(238, 238, 233, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-blur: blur(12px);
    --text: #111111;
    --text-sub: #3a3a3a;
    --text-muted: #7a7a72;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg-soft);
    color: var(--text);
    min-height: 100vh;
    padding: 2rem 1rem;
}

/* ── Hide Scrollbars Across Browsers ── */
/* 
   Ensures a clean look by hiding scrollbars while maintaining scroll functionality.
   Supports Firefox, Chrome, Safari, and legacy Edge/IE.
*/
@supports (scrollbar-width: none) {
    * {
        scrollbar-width: none;           /* Modern Firefox and Chrome 121+ */
    }
}

* {
    -ms-overflow-style: none;            /* Legacy IE and Edge */
}

/* Chrome, Safari, and Opera */
*::-webkit-scrollbar {
    display: none;                       /* Hide scrollbar */
}

.container {
    max-width: 1020px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

.header-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    width: 100%;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.header-center {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    grid-column: 2;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    color: #0a0a0a;
}

.subtitle-engaged {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    width: 100%;
}

.sub-pill {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 0.25rem 0.65rem;
    border-radius: 99px;
    border: 1px solid var(--border-soft);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s var(--ease);
}

.sub-pill:hover {
    color: var(--text);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.sub-sep {
    width: 1px;
    height: 14px;
    background: var(--border-light);
    margin: 0 0.35rem;
}

.sub-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1a1a1a;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0f7ff;
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    border: 1px solid #cce4ff;
}

.pulse {
    width: 8px;
    height: 8px;
    background: #0084ff;
    border-radius: 50%;
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0084ff;
    border-radius: inherit;
    animation: subPulse 2s infinite ease-out;
}

@keyframes subPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2.5); opacity: 0; }
}

.how-btn,
.home-btn {
    background: white;
    border: 1.2px solid var(--border-light);
    color: var(--text);
    padding: 0.55rem 1.2rem;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: all 0.2s var(--ease);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.how-btn {
    justify-self: end;
}

.home-btn {
    justify-self: start;
}

.how-btn:hover,
.home-btn:hover {
    background: #1a1a1a;
    color: white;
}

/* ── Main Card ── */
/* ── Chassis Wireframe ── */
.chassis {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1.2px solid var(--border-light);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .08);
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: fadeUp 0.4s ease-out;
}

/* Header Chassis (Floating Card) */
.header-chassis {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1.2px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 1.5rem;
    margin: 2rem auto;
    width: calc(100% - 2.5rem);
    max-width: 1200px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, .06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: footerFloat 6s ease-in-out infinite alternate,
               footerMorph 12s linear infinite;
    z-index: 1000;
}

.chassis-top, .chassis-bottom {
    height: 30px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--bg-soft);
    opacity: 0.6;
    flex-shrink: 0;
}

/* ── Main Card ── */
.main-card {
    background: var(--bg);
    border-radius: 12px;
    border: 1.2px solid var(--border-light);
    padding: 2rem;
    flex: 1;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Main Tab Nav ── */
.tab-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.8rem;
    border-bottom: 2px solid var(--border-light);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.75rem 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .2s, border-color .2s;
    white-space: nowrap;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-btn:hover {
    color: var(--primary);
}

.panel {
    display: none;
}

.panel.active {
    display: block;
    animation: fadeUp 0.3s ease-out;
}

/* ── Sub Tab Nav (content types) ── */
.sub-tab-nav {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    background: var(--bg-soft);
    border-radius: 8px;
}

.sub-tab-btn {
    background: none;
    border: none;
    padding: 0.45rem 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}

.sub-tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sub-tab-btn:hover {
    color: var(--primary);
}

.sub-panel {
    display: none;
}

.sub-panel.active {
    display: block;
    animation: fadeUp .25s ease-out;
}

/* ── Layout ── */
.qr-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

/* ── Input Groups ── */
.input-group {
    margin-bottom: 1.2rem;
}

.input-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.qr-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-light);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    background: white;
}

.qr-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, .1);
}

textarea.qr-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

select.qr-input {
    appearance: none;
    cursor: pointer;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.char-count {
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Controls Section (Internal Sticky) ── */
.controls-section {
     padding-top: 1.5rem;
     border-top: 1px solid var(--border-light);
     display: flex;
     flex-direction: column;
 }
 
 #left-controls-place {
     margin-top: 2rem;
 }
 
 #right-controls-place {
     margin-top: 1.5rem;
 }

/* ── Choice Grid (dot styles, corner styles, frames) ── */
.choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.choice-btn {
    padding: 0.4rem 0.85rem;
    border: 1.5px solid var(--border-light);
    background: white;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-sub);
}

.choice-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.choice-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── Color Row ── */
.color-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1.5px solid var(--border-light);
    cursor: pointer;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.color-swatch input[type="color"] {
    position: absolute;
    inset: -4px;
    width: calc(100% + 8px);
    height: calc(100% + 8px);
    border: none;
    cursor: pointer;
    opacity: 0;
}

.color-swatch-preview {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    pointer-events: none;
}

.color-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-sub);
}

.color-hex {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
    background: var(--bg-soft);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}

/* ── Logo Upload ── */
.upload-zone {
    background: var(--bg-soft);
    border: 2px dashed var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .3s, background .3s;
    display: block;
}

.upload-zone:hover {
    border-color: var(--primary);
    background: #EFEFEA;
}

.upload-zone input {
    display: none;
}

.upload-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.4rem;
}

.upload-text {
    font-size: 0.88rem;
    font-weight: 500;
}

.upload-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    font-family: 'JetBrains Mono', monospace;
}

/* ── Action Buttons ── */
.action-btn {
    width: 100%;
    padding: 0.95rem;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, transform .2s, box-shadow .2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    margin-bottom: 0.75rem;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}

.btn-secondary {
    background: var(--bg-soft);
    color: var(--primary);
    border: 1.5px solid var(--border-light);
}

.btn-secondary:hover:not(:disabled) {
    background: #EFEFEA;
    border-color: var(--primary);
}

.action-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none !important;
}

/* ── QR Preview Card ── */
.qr-preview-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: sticky;
    top: 2rem;
}

.qr-preview-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 1.2rem;
}

#qr-canvas-holder {
    background: white;
    border-radius: 8px;
    border: 1.5px solid var(--border-light);
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    width: 100%;
    margin-bottom: 1.2rem;
    overflow: hidden;
    position: relative;
    transition: all 0.35s var(--ease);
}

#qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-code canvas {
    display: block !important;
    max-width: 100% !important;
}

.frame-label {
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-top: 0.75rem;
    pointer-events: none;
}

.qr-placeholder-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    text-align: center;
    width: 100%;
}

.qr-placeholder-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: block;
}



/* ── Note ── */
.note {
    margin-top: 1.2rem;
    padding: 0.7rem 1rem;
    background: var(--bg-soft);
    border-left: 4px solid var(--border-main);
    border-radius: 6px;
    font-size: 0.82rem;
    color: var(--text-sub);
}

/* ── ECL ── */
.ecl-group {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
}

.ecl-btn {
    flex: 1;
    padding: 0.45rem 0.5rem;
    border: 1.5px solid var(--border-light);
    background: white;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-sub);
    text-align: center;
}

.ecl-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.ecl-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ecl-btn span {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    opacity: 0.75;
    margin-top: 1px;
}

/* ── Size presets ── */
.size-presets {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.size-btn {
    padding: 0.35rem 0.85rem;
    border: 1.5px solid var(--border-light);
    background: white;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    color: var(--text-sub);
}

.size-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.size-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ctrl-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ctrl-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ctrl-input {
    flex: 1;
    padding: 0.55rem 0.85rem;
    border: 1.5px solid var(--border-light);
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    transition: border-color .2s;
    background: white;
    color: var(--text);
}

.ctrl-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, .1);
}

.unit-badge {
    padding: 0.45rem 0.75rem;
    background: var(--bg-soft);
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-sub);
    white-space: nowrap;
}

/* ── Guide Modal ── */
.guide-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.guide-modal.active {
    display: flex;
}

.guide-box {
    background: #fff;
    border-radius: 14px;
    max-width: 640px;
    width: 100%;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
    animation: fadeUp .3s ease-out;
}

.guide-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.8rem 1.2rem;
    border-bottom: 1.5px solid var(--border-light);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 14px 14px 0 0;
}

.guide-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.guide-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    transition: background .2s, color .2s;
}

.guide-close:hover {
    background: #f0f0eb;
    color: #1a1a1a;
}

.guide-body {
    padding: 1.6rem 1.8rem 2rem;
}

.guide-section {
    margin-bottom: 1.8rem;
}

.guide-section h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0a0a0a;
    margin-bottom: .85rem;
}

.step-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.step-list li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-sub);
    line-height: 1.6;
}

.step-num {
    min-width: 24px;
    height: 24px;
    background: #1a1a1a;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

/* ── Meta ── */
.qr-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    text-align: left;
}

.qr-meta-item {
    background: white;
    border-radius: 6px;
    padding: 0.6rem 0.8rem;
}

.qr-meta-lbl {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.qr-meta-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 0.15rem;
}

/* ── Responsive ── */
@media (max-width: 720px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }

    .qr-preview-card {
        position: static;
    }

    h1 {
        font-size: 1.5rem;
    }

    .main-card {
        padding: 1.2rem;
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }
}

/* ── Social Platform Grid ── */
.social-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    padding: 0.65rem 0.35rem;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    background: white;
    transition: border-color .2s, box-shadow .2s, transform .15s;
    -webkit-user-select: none;
    user-select: none;
    font-family: 'Poppins', sans-serif;
}

.social-btn:hover {
    border-color: #888;
    transform: translateY(-1px);
}

.social-btn.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, .12);
}

.social-btn svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.social-btn-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-sub);
    text-align: center;
    line-height: 1.2;
}

.social-btn.active .social-btn-name {
    color: var(--primary);
}

/* ── Frame Thumbnail Grid ── */
.frame-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.65rem;
    margin-bottom: 1.2rem;
}

.frame-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.5rem 0.35rem 0.45rem;
    border-radius: 8px;
    border: 2px solid var(--border-light);
    background: white;
    transition: border-color .2s, box-shadow .2s;
    -webkit-user-select: none;
    user-select: none;
}

.frame-thumb:hover {
    border-color: #888;
}

.frame-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 26, 26, .12);
}

.frame-thumb-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-sub);
    text-align: center;
    line-height: 1.2;
}

.frame-thumb.active .frame-thumb-name {
    color: var(--primary);
}

/* ── Mini QR SVG inside thumb ── */
.ft-svg {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

/* ── FOOTER ── */
/* ── FOOTER ── */
footer {
    position: relative;
    overflow: hidden;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1.2px solid var(--border-light);
    border-radius: 10px;
    padding: 2.5rem 2rem 1rem;
    margin: 2rem auto 3rem;
    width: calc(100% - 2.5rem);
    max-width: 1200px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    gap: 8px;
    animation: footerFloat 6s ease-in-out infinite alternate,
               footerMorph 12s linear infinite;
}

.footer-texture {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image: radial-gradient(var(--text) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    animation: pulseOpacity 8s infinite ease-in-out,
               textureDrift 60s infinite linear;
}

.footer-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.footer-element {
    position: absolute;
    opacity: 0.5;
    animation: elementDrift 20s infinite linear alternate,
               pulseOpacity 10s infinite ease-in-out;
}

@keyframes pulseOpacity {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.5; }
}

@keyframes textureDrift {
    from { background-position: 0 0; }
    to { background-position: 24px 24px; }
}

@keyframes elementDrift {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(30px, 20px) rotate(15deg); }
}

@keyframes footerFloat {
    0% { transform: translateY(0); }
    100% { transform: translateY(-15px); }
}

@keyframes footerMorph {
    0%, 100% { border-radius: 10px 30px 10px 30px / 30px 10px 30px 10px; }
    50%      { border-radius: 30px 10px 30px 10px / 10px 30px 10px 30px; }
}

footer .container {
    position: relative;
    z-index: 1;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    max-width: 100%;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-brand-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .7rem;
}

.footer-tagline {
    font-size: .8rem;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 210px;
}

.footer-col h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-sub);
    margin-bottom: .85rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.footer-links a {
    font-size: .82rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-bottom {
    border-top: 1px solid var(--border-soft);
    padding-top: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: .75rem;
    color: var(--text-muted);
}

.footer-mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    color: var(--text-muted);
}

@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }

    header h1 {
        font-size: 3rem;
    }

    .main-card {
        padding: 3rem;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 920px;
    }

    h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .qr-layout {
        grid-template-columns: 1fr;
    }

    .qr-preview-card {
        position: static;
        margin-top: 1rem;
    }

    .header-top {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }

    .how-btn,
    .home-btn {
        width: 100%;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem 0.5rem;
    }

    .main-card {
        padding: 1rem;
    }

    .tab-btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }

    .sub-tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }
}

/* ── Additions for refactored inline styles ── */
.text-input-area {
    min-height: 160px;
}

.text-tip {
    display: none;
    margin-top: 1rem;
}

.social-hint-margin {
    margin-top: 0.5rem;
}

.corner-dot-grid-label {
    margin-top: 1rem;
}

.ctrl-row-no-margin {
    margin-bottom: 0;
}

.logo-settings-panel {
    display: none;
    margin-top: 1.2rem;
}

.logo-size-range {
    width: 100%;
}

.remove-logo-btn {
    margin-top: 0.5rem;
}

.logo-tip-margin {
    margin-top: 1.2rem;
}

.label-text-color-label {
    margin-top: 1rem;
}

.download-btns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.qr-code-hidden {
    display: none;
}

.frame-label-default {
    display: none;
    color: #1a1a1a;
}

.qr-meta-hidden {
    display: none;
}

/* New classes for refactored static inline styles */
.preview-black {
    background: #000000;
}

.preview-white {
    background: #ffffff;
}

.preview-primary {
    background: #1a1a1a;
}

.footer-brand-name {
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: -.02em;
}

/* ── Glass frame thumbnail background ── */
.glass-preview-bg {
    background: linear-gradient(135deg, #e0eafc, #fac3dc);
}

/* ── Social frame label: flex centering ── */
.frame-label-social {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
}


/* ── Badge frame circular clip ── */
.frame-thumb[data-value="badge"] .ft-svg {
    overflow: visible;
}

/* ── Gmail Extra Fields ── */
.gmail-extra-fields {
    display: none;
    margin-top: 1.2rem;
}

.gmail-body-group {
    margin-top: 1.2rem;
}

.gmail-body-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.gmail-body-textarea {
    resize: vertical;
    min-height: 80px;
}

/* ── Utility: Transparent BG ── */
.transparent-bg-group {
    margin-top: 0.5rem;
}

.transparent-bg-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text-sub);
}

.transparent-bg-checkbox {
    accent-color: var(--primary);
}

/* ── Button Placements ── */
#left-controls-place {
    margin-top: 2rem;
    width: 100%;
}

#right-controls-place {
    margin-top: 1.5rem;
    width: 100%;
}
