/* ─── Base reset & variables (same as v1 + additions) ─── */
*,
*::before,
*::after {
    box-sizing: border-box;

    [hidden] {
        display: none !important;
    }

    margin: 0;
    padding: 0
}

:root {
    --bg: #08091a;
    --bg-2: #0f1228;
    --surface: rgba(255, 255, 255, .035);
    --surface-2: rgba(255, 255, 255, .06);
    --border: rgba(255, 255, 255, .09);
    --border-hi: rgba(255, 255, 255, .18);
    --text: #e6e8f0;
    --muted: #8b90a8;
    --accent: #8b5cf6;
    --accent-2: #6366f1;
    --accent-hi: #a78bfa;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 20px 60px -20px rgba(0, 0, 0, .65);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, monospace;
}

html,
body {
    min-height: 100%
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: radial-gradient(ellipse at top left, #111432 0%, var(--bg) 55%, #05060f 100%);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased
}

.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: .35;
    pointer-events: none;
    z-index: 0;
    animation: float 22s ease-in-out infinite
}

.bg-orb-1 {
    width: 480px;
    height: 480px;
    background: #7c3aed;
    top: -180px;
    left: -160px
}

.bg-orb-2 {
    width: 420px;
    height: 420px;
    background: #3b82f6;
    bottom: -140px;
    right: -120px;
    animation-delay: -8s
}

.bg-orb-3 {
    width: 340px;
    height: 340px;
    background: #ec4899;
    top: 45%;
    left: 55%;
    opacity: .2;
    animation-delay: -14s
}

.bg-grid {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%)
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1)
    }

    33% {
        transform: translate(40px, -30px) scale(1.08)
    }

    66% {
        transform: translate(-25px, 25px) scale(.94)
    }
}

/* Top bar */
.top-bar {
    position: relative;
    z-index: 2;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    background: rgba(8, 9, 26, .55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px)
}

.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 8px 24px -8px rgba(139, 92, 246, .6)
}

.brand-title {
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -.01em
}

.brand-sub {
    font-size: 12px;
    color: var(--muted)
}

.ghost-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    transition: all .15s
}

.ghost-btn:hover {
    color: var(--text);
    border-color: var(--border-hi);
    background: var(--surface)
}

/* Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 48px 24px 80px
}

.hero {
    text-align: center;
    margin-bottom: 40px
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(139, 92, 246, .12);
    border: 1px solid rgba(139, 92, 246, .3);
    color: var(--accent-hi);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px
}

.hero h1 {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    margin-bottom: 16px
}

.grad-text {
    background: linear-gradient(135deg, #a78bfa 0%, #6366f1 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.hero p {
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto;
    font-size: 15px
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 24px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: var(--shadow);
    animation: cardIn .4s ease
}

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

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

.step-head {
    display: flex;
    gap: 16px;
    margin-bottom: 24px
}

.step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, .25), rgba(99, 102, 241, .15));
    border: 1px solid rgba(139, 92, 246, .3);
    color: var(--accent-hi)
}

.step-head h2 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em
}

.step-head p {
    color: var(--muted);
    font-size: 13.5px;
    margin-top: 2px
}

/* Search */
.search-wrap {
    position: relative;
    margin-bottom: 14px
}

.search-wrap input {
    width: 100%;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all .15s;
    font-family: inherit
}

.search-wrap input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(139, 92, 246, .06);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .15)
}

.search-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--muted)
}

.suggestions {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(10, 12, 30, .85);
    margin-bottom: 14px;
    animation: fadeIn .15s ease
}

.suggestion {
    padding: 11px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    transition: background .1s
}

.suggestion:last-child {
    border-bottom: 0
}

.suggestion:hover {
    background: rgba(139, 92, 246, .12)
}

.suggestion .slug {
    color: var(--muted);
    font-family: var(--mono);
    font-size: 12px
}

.suggestion mark {
    background: rgba(167, 139, 250, .25);
    color: var(--accent-hi);
    padding: 0 2px;
    border-radius: 3px
}

.or-row {
    text-align: center;
    margin: 18px 0;
    color: var(--muted);
    font-size: 12px;
    position: relative
}

.or-row::before,
.or-row::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border)
}

.or-row::before {
    left: 0
}

.or-row::after {
    right: 0
}

.inline-form {
    display: flex;
    gap: 10px
}

.inline-form input {
    flex: 1;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: all .15s
}

.inline-form input:focus {
    outline: none;
    border-color: var(--accent)
}

@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

/* Workspace layout */
.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 460px;
    gap: 24px;
    align-items: start
}

@media (max-width:1100px) {
    .workspace {
        grid-template-columns: 1fr
    }

    .preview-col {
        position: static !important
    }
}

.config-col {
    min-width: 0
}

.preview-col {
    position: sticky;
    top: 24px;
    min-width: 0
}

/* Tabs */
.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0
}

.tab {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    display: flex;
    align-items: center;
    gap: 8px
}

.tab:hover {
    color: var(--text)
}

.tab.active {
    color: var(--accent-hi);
    border-bottom-color: var(--accent)
}

.tab .badge {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(139, 92, 246, .15);
    color: var(--accent-hi);
    font-size: 11px;
    font-weight: 700
}

.small-tabs {
    margin-bottom: 12px
}

.small-tabs .tab {
    padding: 8px 12px;
    font-size: 13px
}

.tab-panel {
    display: none;
    animation: fadeIn .2s ease
}

.tab-panel.active {
    display: block
}

/* Fields */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px
}

@media (max-width:640px) {
    .grid-2 {
        grid-template-columns: 1fr
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.field>span {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: .01em
}

.field>span em {
    font-style: normal;
    font-weight: 400;
    opacity: .7
}

.field input {
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: all .15s
}

.field input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(139, 92, 246, .06);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .12)
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0
}

.sub-fields {
    margin-top: 12px;
    padding-left: 60px;
    animation: fadeIn .2s ease
}

@media (max-width:640px) {
    .sub-fields {
        padding-left: 0
    }
}

.radio-group {
    display: flex;
    gap: 10px
}

.radio-group label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s;
    font-size: 14px
}

.radio-group label:has(input:checked) {
    border-color: var(--accent);
    background: rgba(139, 92, 246, .1)
}

.radio-group input {
    accent-color: var(--accent)
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px
}

@media (max-width:640px) {
    .checks {
        grid-template-columns: 1fr
    }
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13.5px;
    font-family: var(--mono);
    transition: all .15s
}

.check:has(input:checked) {
    border-color: var(--accent);
    background: rgba(139, 92, 246, .08)
}

.check input {
    accent-color: var(--accent)
}

/* Toggles */
.toggle-row {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0
}

.toggle-row+.toggle-row {
    border-top: 1px solid var(--border)
}

.toggle-row strong {
    font-size: 14px;
    display: block
}

.toggle-row .small {
    font-size: 12px;
    margin-top: 2px
}

.switch {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 44px;
    height: 26px
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0
}

.slider {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .12);
    border-radius: 999px;
    cursor: pointer;
    transition: .2s
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .2s
}

.switch input:checked+.slider {
    background: linear-gradient(135deg, var(--accent), var(--accent-2))
}

.switch input:checked+.slider::before {
    transform: translateX(18px)
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    transition: all .15s;
    text-decoration: none;
    color: var(--text)
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    box-shadow: 0 8px 24px -8px rgba(139, 92, 246, .6)
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 32px -8px rgba(139, 92, 246, .8)
}

.btn-secondary {
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text)
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(255, 255, 255, .1);
    border-color: var(--border-hi)
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px
}

.btn-icon {
    font-size: 16px
}

.action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 16px;
    transition: all .15s
}

.icon-btn:hover {
    background: rgba(139, 92, 246, .15);
    border-color: var(--accent)
}

.icon-btn:disabled {
    opacity: .4;
    cursor: not-allowed
}

/* ─── Preview Card ─── */
.preview-card {
    padding: 20px
}

.preview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px
}

.preview-head h2 {
    font-size: 18px;
    font-weight: 700
}

.preview-head p {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 2px
}

.preview-controls {
    display: flex;
    gap: 6px
}

.preview-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 16px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #1a1f3a 0%, #0a0d22 100%);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, .6);
}

.pv-backdrop {
    position: absolute;
    inset: 0;
    z-index: 1;
    transition: background .3s ease
}

.pv-layer {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center
}

.pv-pattern {
    z-index: 2;
    opacity: .55;
    mix-blend-mode: screen;
    pointer-events: none
}

.pv-gift {
    z-index: 3
}

.pv-gift svg,
.pv-pattern svg {
    width: 100%;
    height: 100%;
    object-fit: contain
}

.pv-empty {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    gap: 8px;
    pointer-events: none
}

.pv-empty-icon {
    font-size: 48px;
    opacity: .5
}

.pv-empty p {
    font-size: 13px
}

.pv-loading {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .4);
    backdrop-filter: blur(4px)
}

.pv-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, .1);
    border-top-color: var(--accent-hi);
    border-radius: 50%;
    animation: spin 1s linear infinite
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.pv-disabled-note {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 13px
}

.preview-actions {
    margin-top: 12px
}

.preview-pill {
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    font-family: var(--mono)
}

.preview-canvas:has(#pv-empty:not([hidden]))~.preview-actions .preview-pill {
    opacity: .5
}

/* ─── Attribute picker ─── */
.attribute-picker {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 16px
}

.attr-search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px
}

.attr-search {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit
}

.attr-search:focus {
    outline: none;
    border-color: var(--accent)
}

.attr-sort {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text);
    background: rgba(0, 0, 0, .25);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    cursor: pointer
}

.attr-sort:focus {
    outline: none;
    border-color: var(--accent)
}

.attr-panel {
    display: none
}

.attr-panel.active {
    display: block;
    animation: fadeIn .2s ease
}

.backdrop-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px
}

@media (max-width:400px) {
    .backdrop-grid {
        grid-template-columns: repeat(3, 1fr)
    }
}

.bd-card {
    position: relative;
    aspect-ratio: 1/1;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
    transition: all .15s;
    font-family: inherit
}

.bd-card:hover {
    transform: scale(1.05);
    border-color: var(--border-hi)
}

.bd-card.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .3)
}

.bd-name {
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    padding: 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.bd-pm {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8.5px;
    font-weight: 800;
    background: rgba(0, 0, 0, .6);
    color: #fff;
    padding: 1px 4px;
    border-radius: 3px
}

.virtual-list {
    height: 320px;
    overflow-y: auto;
    padding-right: 4px;
    position: relative
}

.attr-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: var(--text);
    width: 100%;
    transition: all .12s;
    margin-bottom: 2px
}

.attr-row:hover {
    background: var(--surface-2);
    border-color: var(--border-hi)
}

.attr-row.selected {
    border-color: var(--accent);
    background: rgba(139, 92, 246, .1)
}

.attr-row-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px
}

.attr-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0
}

.attr-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: var(--muted);
    flex-shrink: 0;
    text-transform: capitalize
}

.attr-badge.r-uncommon {
    background: rgba(34, 197, 94, .15);
    color: #4ade80
}

.attr-badge.r-rare {
    background: rgba(59, 130, 246, .15);
    color: #60a5fa
}

.attr-badge.r-epic {
    background: rgba(168, 85, 247, .15);
    color: #c084fc
}

.attr-badge.r-legendary {
    background: rgba(245, 158, 11, .15);
    color: #fbbf24
}

.attr-bar {
    height: 3px;
    background: rgba(255, 255, 255, .06);
    border-radius: 999px;
    overflow: hidden
}

.attr-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-hi));
    border-radius: 999px;
    transition: width .2s
}

.empty-note {
    text-align: center;
    padding: 24px;
    color: var(--muted);
    font-size: 13px
}

/* Stats */
.stats-card {
    padding: 20px
}

.stats-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px
}

.stats-body {
    display: flex;
    flex-direction: column;
    gap: 14px
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px
}

.stat {
    text-align: center;
    padding: 10px 6px;
    background: rgba(0, 0, 0, .2);
    border: 1px solid var(--border);
    border-radius: 10px
}

.stat-num {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-hi);
    font-family: var(--mono)
}

.stat-lbl {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 2px
}

.stat-rarities {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.rarity-chip {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255, 255, 255, .06)
}

.rarity-chip.r-uncommon {
    background: rgba(34, 197, 94, .15);
    color: #4ade80
}

.rarity-chip.r-rare {
    background: rgba(59, 130, 246, .15);
    color: #60a5fa
}

.rarity-chip.r-epic {
    background: rgba(168, 85, 247, .15);
    color: #c084fc
}

.rarity-chip.r-legendary {
    background: rgba(245, 158, 11, .15);
    color: #fbbf24
}

/* Progress & log */
.progress-wrap {
    margin-bottom: 16px
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, .08);
    border-radius: 999px;
    overflow: hidden;
    position: relative
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2), var(--accent-hi));
    border-radius: 999px;
    transition: width .3s ease;
    box-shadow: 0 0 16px rgba(139, 92, 246, .6)
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: var(--muted);
    font-family: var(--mono)
}

.log-wrap {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-top: 16px
}

.log-wrap summary {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    list-style: none
}

.log-wrap summary::-webkit-details-marker {
    display: none
}

.log-wrap summary::before {
    content: "▸ ";
    color: var(--muted)
}

.log-wrap[open] summary::before {
    content: "▾ "
}

.log {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 16px;
    font-family: var(--mono);
    font-size: 12px;
    line-height: 1.6;
    background: rgba(0, 0, 0, .35);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm)
}

.log-line {
    margin-bottom: 2px
}

.log-line.info {
    color: #93c5fd
}

.log-line.success {
    color: var(--success)
}

.log-line.warning {
    color: var(--warning)
}

.log-line.error {
    color: var(--danger)
}

/* Result */
.result {
    text-align: center;
    padding: 28px;
    border: 1px solid rgba(16, 185, 129, .3);
    background: rgba(16, 185, 129, .05);
    border-radius: var(--radius);
    margin-top: 20px;
    animation: popIn .4s cubic-bezier(.34, 1.56, .64, 1)
}

.result.error {
    border-color: rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .05)
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(.9)
    }

    100% {
        opacity: 1;
        transform: scale(1)
    }
}

.result-check {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
    font-weight: 800;
    margin: 0 auto 16px;
    background: var(--success);
    color: #fff
}

.result.error .result-check {
    background: var(--danger)
}

.result h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px
}

.result .btn {
    margin-top: 20px
}

.result-hash {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center
}

.result-hash code {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted);
    word-break: break-all;
    max-width: 100%
}

/* Misc */
.muted {
    color: var(--muted)
}

.small {
    font-size: 12.5px
}

.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 24px;
    font-size: 13px;
    color: var(--muted);
    border-top: 1px solid var(--border)
}

.footer code {
    font-family: var(--mono);
    color: var(--accent-hi);
    font-size: 12px
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px
}

::-webkit-scrollbar-track {
    background: transparent
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: 3px
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, .2)
}

/* Mobile */
@media (max-width:640px) {
    .container {
        padding: 32px 16px 60px
    }

    .card {
        padding: 20px
    }

    .preview-canvas {
        max-height: 380px
    }

    .backdrop-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .attr-search-row {
        flex-direction: column
    }
}
