:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5eaf2;
    --brand: #2f7cf6;
    --brand-strong: #1f67d3;
    --focus: rgba(47, 124, 246, 0.18);
    --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --radius: 16px;
    --font-main: 'Pretendard', 'SF Pro Text', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: var(--font-main);
}

.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 16px 36px;
}

.hero {
    margin-bottom: 14px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #2f7cf6, #6ca7ff);
    color: #fff;
    box-shadow: var(--shadow);
}

.hero h1 {
    margin: 0;
    font-size: clamp(1.5rem, 4vw, 2rem);
    letter-spacing: -0.02em;
}

.hero p {
    margin: 8px 0 0;
    opacity: 0.95;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 12px;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.panel-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.panel-body {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
}

.field {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 11px 12px;
    font-family: var(--font-main);
    font-size: 0.96rem;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #9dc3ff;
    box-shadow: 0 0 0 4px var(--focus);
}

.btn {
    grid-column: span 3;
    align-self: end;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}

.btn:disabled {
    cursor: not-allowed;
    background: #9ab7ea;
}

.status,
.preview,
.full {
    grid-column: 1 / -1;
}

.status {
    color: #4b5563;
    font-size: 0.9rem;
}

.preview {
    min-height: 180px;
    border: 1px dashed #d8e1ef;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f8faff;
    padding: 8px;
}

#ocr-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    display: none;
}

#ai-output {
    min-height: 250px;
}

@media (max-width: 760px) {
    .field,
    .btn {
        grid-column: 1 / -1;
    }
}
