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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f0f4f8;
    color: #1a202c;
    min-height: 100vh
}

.header {
    background: #0F172A;
    color: #fff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.header h1 {
    font-size: 20px;
    font-weight: 700
}

.header p {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px
}

.header .author {
    text-align: right;
    font-size: 11px;
    color: #64748b
}

.header .author span {
    color: #0891b2;
    font-weight: 600
}

.container {
    max-width: 960px;
    margin: 20px auto;
    padding: 0 20px
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08)
}

.card h2 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #0F172A;
    display: flex;
    align-items: center;
    gap: 8px
}

.card h2 .num {
    background: #0891b2;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 6px
}

input[type=text],
select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px
}

input:focus,
select:focus {
    outline: none;
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8, 145, 178, .1)
}

.row {
    display: flex;
    gap: 12px
}

.row>div {
    flex: 1
}

.drop-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: .2s;
    background: #f8fafc
}

.drop-zone:hover,
.drop-zone.active {
    border-color: #0891b2;
    background: #ecfeff
}

.drop-zone input {
    display: none
}

.specs {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap
}

.spec {
    background: #f1f5f9;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    color: #475569
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px
}

.preview-item {
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0
}

.preview-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background: #fff
}

.preview-item .info {
    padding: 12px
}

.preview-item .filename {
    font-size: 12px;
    font-weight: 700;
    color: #0F172A;
    word-break: break-all;
    margin-bottom: 6px
}

.preview-item .meta {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px
}

.preview-item .meta.ok {
    color: #059669
}

.preview-item .controls {
    display: flex;
    gap: 6px;
    margin-bottom: 8px
}

.preview-item select {
    margin-bottom: 0;
    font-size: 12px;
    padding: 6px 8px;
    flex: 1
}

.alt-box {
    background: #f1f5f9;
    border-radius: 6px;
    padding: 10px;
    font-size: 12px;
    color: #334155;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
    min-height: 40px
}

.alt-box .placeholder {
    color: #dc2626;
    font-weight: 700;
    background: #fef2f2;
    padding: 1px 4px;
    border-radius: 3px;
    white-space: nowrap
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: .2s
}

.copy-btn:hover {
    background: #ecfeff;
    border-color: #0891b2;
    color: #0891b2
}

.copy-btn.copied {
    background: #ecfdf5;
    border-color: #059669;
    color: #059669
}

.seo-check {
    margin-top: 6px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.5;
    display: none
}

.seo-check.ok {
    display: block;
    background: #ecfdf5;
    border: 1px solid #059669;
    color: #065f46
}

.seo-check.warn {
    display: block;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    color: #92400e
}

.seo-check.error {
    display: block;
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b
}

.slug-preview {
    font-size: 11px;
    color: #64748b;
    margin-top: 4px;
    margin-bottom: 12px
}

.slug-preview strong {
    color: #0891b2
}

.output-group {
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 14px
}

.output-group:last-child {
    border-bottom: none;
    padding-bottom: 0
}

.output-label {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 4px
}

.output-hint {
    font-size: 11px;
    font-weight: 400;
    color: #94a3b8
}

.output-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    color: #1a202c;
    line-height: 1.6;
    min-height: 20px;
    word-break: break-word
}

.output-box.desc {
    font-size: 12px;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto
}

.output-meta {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px
}

.output-meta.warn {
    color: #f59e0b
}

.output-meta.ok {
    color: #059669
}

.title-warn {
    color: #dc2626;
    font-weight: 700;
    background: #fef2f2;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 12px
}

.group-header {
    font-size: 13px;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 6px;
    margin-bottom: 4px;
    margin-top: 8px;
    letter-spacing: 0.5px
}

.group-header.tib {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd
}

.group-header.shopify {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac
}

.group-note {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 14px;
    padding-left: 14px
}

.toggle-row {
    margin-bottom: 14px;
    margin-top: 4px
}

.toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    display: block;
    margin-bottom: 6px
}

.toggle-btns {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    width: fit-content
}

.toggle-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    background: #f8fafc;
    color: #64748b;
    transition: .2s
}

.toggle-btn.active {
    background: #0891b2;
    color: #fff
}

.toggle-btn:hover:not(.active) {
    background: #e2e8f0
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: .2s
}

.btn-primary {
    background: #0891b2;
    color: #fff
}

.btn-primary:hover {
    background: #0e7490
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed
}

.btn-danger {
    background: #ef4444;
    color: #fff
}

.btn-danger:hover {
    background: #dc2626
}

.btn-row {
    display: flex;
    gap: 8px;
    margin-top: 16px
}

.progress {
    margin-top: 12px
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden
}

.progress-fill {
    height: 100%;
    background: #0891b2;
    transition: width .3s;
    border-radius: 3px
}

.progress-text {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px
}

.help {
    background: #fffbeb;
    border: 1px solid #fbbf24;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
    line-height: 1.5
}

.stats {
    display: flex;
    gap: 20px;
    margin-top: 12px
}

.stat {
    text-align: center
}

.stat .num {
    font-size: 22px;
    font-weight: 700;
    color: #0891b2
}

.stat .label {
    font-size: 11px;
    color: #64748b
}