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


:root {
    --site-shell-max-width: 1100px;
    --site-page-gutter: clamp(12px, 2.4vw, 22px);
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #14532d 0%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--site-page-gutter);
}

.container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 36px;
    max-width: var(--site-shell-max-width);
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

h1 {
    font-size: 31px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 12px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #475569;
    margin-bottom: 24px;
    font-size: 16px;
    line-height: 1.6;
}

.privacy-notice {
    background: linear-gradient(135deg, #dcfce7 0%, #f0fdf4 100%);
    border: 2px solid #14532d;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 4px 12px rgba(20, 83, 45, 0.16);
}

.privacy-icon {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #14532d;
    background: rgba(20, 83, 45, 0.12);
    border-radius: 999px;
    padding: 6px 10px;
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-content strong {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.privacy-content p {
    font-size: 14px;
    color: #1e293b;
    line-height: 1.6;
}

.tool-section {
    border: 2px solid #dbe4ef;
    border-radius: 14px;
    background: #ffffff;
    padding: 16px;
    margin-bottom: 16px;
}

.tool-section h2 {
    font-size: 20px;
    color: #14532d;
    margin-bottom: 12px;
}

.upload-area {
    border: 2px dashed #86efac;
    border-radius: 12px;
    background: #f0fdf4;
    padding: 26px;
    text-align: center;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #22c55e;
    background: #dcfce7;
}

.upload-icon {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #14532d;
    background: rgba(20, 83, 45, 0.12);
    border-radius: 999px;
    display: inline-block;
    padding: 6px 10px;
    margin-bottom: 8px;
}

.upload-text {
    font-size: 16px;
    font-weight: 700;
    color: #14532d;
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 14px;
    color: #334155;
}

.upload-hint span {
    color: #166534;
    font-weight: 700;
}

input[type="file"] {
    display: none;
}

.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 12px;
}

.toolbar-group {
    min-width: 180px;
}

.toolbar-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
}

.toolbar-group select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    min-height: 40px;
    padding: 8px 10px;
    color: #1e293b;
}

.toolbar-group-summary {
    margin-left: auto;
    min-width: 240px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 9px 12px;
}

.toolbar-group-summary p {
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.action-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, #166534 0%, #14532d 100%);
    box-shadow: 0 6px 14px rgba(20, 83, 45, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(20, 83, 45, 0.3);
}

.action-btn:focus-visible {
    outline: 3px solid rgba(22, 101, 52, 0.3);
    outline-offset: 2px;
}

.secondary-btn {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 6px 14px rgba(51, 65, 85, 0.25);
}

.status {
    min-height: 20px;
    font-size: 14px;
    color: #14532d;
    font-weight: 600;
    margin-bottom: 12px;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.preview-empty {
    grid-column: 1 / -1;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
}

.preview-card {
    border: 1px solid #d1dbe8;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    min-height: 270px;
}

.preview-card-header {
    display: flex;
    gap: 8px;
    align-items: start;
    padding: 10px;
    background: #ffffff;
    border-bottom: 1px solid #dbe4ef;
}

.preview-select {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex-shrink: 0;
}

.preview-meta {
    min-width: 0;
}

.preview-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    word-break: break-word;
}

.preview-size {
    font-size: 12px;
    color: #64748b;
    margin-top: 3px;
}

.preview-type {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
}

.preview-view {
    flex: 1;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e2e8f0;
    position: relative;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.preview-pdf {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
}

.footer-links {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

.footer-links nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.footer-links a {
    color: #14532d;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 8px;
}

.footer-links a:hover {
    background: #e2e8f0;
}

.back-btn {
    color: #1d4ed8;
}

@media (max-width: 768px) {
    .container {
        padding: 24px;
    }

    h1 {
        font-size: 26px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-group-summary {
        margin-left: 0;
    }

    .actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }
}

