:root {
    --void: #0a0a12;
    --void-2: #12101f;
    --panel: #161425;
    --panel-2: #1c1930;
    --line: rgba(255, 255, 255, .08);
    --line-2: rgba(255, 255, 255, .14);
    --violet: #7c5cff;
    --violet-soft: #a894ff;
    --cyan: #22d3ee;
    --ink: #ece9ff;
    --muted: #8f8bab;
    --muted-2: #6b6885;
    --display: 'Space Grotesk', 'Pretendard', sans-serif;
    --body-font: 'Pretendard', 'Space Grotesk', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--void);
    color: var(--ink);
    font-family: var(--body-font);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.atmosphere {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: .5;
}

.aurora.a1 {
    width: 560px;
    height: 560px;
    top: -240px;
    left: -160px;
    background: radial-gradient(circle, rgba(124, 92, 255, .55), transparent 68%);
}

.aurora.a2 {
    width: 500px;
    height: 500px;
    top: 8%;
    right: -200px;
    background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 68%);
}

.aurora.a3 {
    width: 620px;
    height: 620px;
    bottom: -320px;
    left: 20%;
    background: radial-gradient(circle, rgba(124, 92, 255, .3), transparent 68%);
}

.grid-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--line) 1px, transparent 1px),
        linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
    opacity: .6;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    background: linear-gradient(135deg, var(--violet-soft), var(--cyan));
    color: var(--void);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-decoration: none;
    z-index: 100;
    transition: top .15s ease;
}

.skip-link:focus {
    top: 12px;
}

.page {
    position: relative;
    z-index: 1;
    max-width: 960px;
    margin: 0 auto;
    padding: 56px 20px 80px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(124, 92, 255, .1);
    border: 1px solid rgba(124, 92, 255, .28);
    border-radius: 999px;
    padding: 7px 16px 7px 12px;
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--violet-soft);
    letter-spacing: .04em;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

.hero h1 {
    font-family: var(--display);
    font-size: clamp(30px, 4.6vw, 42px);
    font-weight: 700;
    letter-spacing: -.03em;
    margin: 22px 0 12px;
    color: var(--ink);
}

.hero h1 .grad {
    background: linear-gradient(115deg, var(--violet-soft) 10%, var(--cyan) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    font-size: 15px;
    color: var(--muted);
    margin: 0 auto;
    max-width: 460px;
    line-height: 1.6;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.card {
    background: linear-gradient(180deg, var(--panel), var(--void-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.card h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 22px;
    color: var(--ink);
}

.card h2 .muted {
    color: var(--muted-2);
    font-weight: 500;
    font-size: 14px;
}

.step {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid var(--violet-soft);
    color: var(--violet-soft);
    background: rgba(124, 92, 255, .1);
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
}

.hint-inline {
    font-weight: 500;
    color: var(--muted-2);
}

textarea,
input[type="text"] {
    font-family: inherit;
    color: var(--ink);
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 120px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 15px;
    line-height: 1.55;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

textarea::placeholder {
    color: var(--muted-2);
}

textarea:focus,
.swatch:focus-within,
.dropzone:focus-within {
    outline: none;
    border-color: var(--violet-soft);
    background: rgba(124, 92, 255, .06);
    box-shadow: 0 0 0 3px rgba(124, 92, 255, .14);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.swatch {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.swatch-box {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .18);
    cursor: pointer;
}

.swatch input[type="text"] {
    background: transparent;
    border: none;
    width: 100%;
    font-size: 14px;
    font-family: var(--mono);
    padding: 4px 0;
    letter-spacing: .02em;
}

.swatch input[type="text"]:focus {
    outline: none;
}

.segmented {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    padding: 4px;
}

.seg-btn {
    flex: 1;
    appearance: none;
    border: none;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 8px;
    border-radius: calc(var(--radius-md) - 4px);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.seg-btn:hover:not(.active) {
    color: var(--ink);
}

.seg-btn.active {
    background: linear-gradient(135deg, var(--violet-soft), var(--cyan));
    color: var(--void);
    box-shadow: 0 4px 14px -4px rgba(124, 92, 255, .55);
}

.seg-btn:focus-visible {
    outline: 2px solid var(--violet-soft);
    outline-offset: 2px;
}

.hint {
    font-size: 13px;
    color: var(--muted-2);
    line-height: 1.6;
    margin: 0;
}

.hint strong {
    color: var(--muted);
}

.dropzone {
    position: relative;
    border: 1.5px dashed var(--line-2);
    border-radius: var(--radius-md);
    padding: 22px 16px;
    text-align: center;
    transition: border-color .2s ease, background .2s ease;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: var(--violet-soft);
    background: rgba(124, 92, 255, .06);
}

.dropzone-label {
    display: block;
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
}

.dropzone-label .link {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.dropzone-sub {
    font-size: 12px;
    color: var(--muted-2);
    margin-top: 6px;
}

.dropzone-filename {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    word-break: break-all;
}

.remove-logo-btn[hidden] {
    display: none;
}

.remove-logo-btn {
    display: block;
    margin: 10px auto 0;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.remove-logo-btn:hover {
    color: var(--ink);
}

.qr-scanner {
    background: linear-gradient(160deg, var(--panel-2), var(--void-2));
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
}

.qr-scanner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted-2);
    padding: 0 4px 14px;
}

.qr-scanner-head .live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--cyan);
}

.qr-scanner-head .live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: pulse 1.6s infinite;
}

.qr-frame {
    background: #ffffff;
    border-radius: calc(var(--radius-lg) - 6px);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrPreview {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qrPreview svg,
#qrPreview canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.qr-fallback {
    font-size: 13px;
    color: var(--muted-2);
    text-align: center;
}

.actions {
    display: flex;
    gap: 12px;
}

.btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .12s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    border: none;
    background: linear-gradient(135deg, var(--violet-soft), var(--cyan));
    color: var(--void);
    box-shadow: 0 10px 30px -8px rgba(124, 92, 255, .6);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px -8px rgba(124, 92, 255, .7);
}

.btn-secondary {
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, .04);
    color: var(--ink);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, .08);
    border-color: var(--violet-soft);
}

.btn:focus-visible {
    outline: 2px solid var(--violet-soft);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 760px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .page {
        padding: 40px 16px 60px;
    }

    .card {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition: none !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
