/* Marathon Photo AI — evidence UI (framework-free CSS). */

:root {
    --brand: #ff6a1a;
    --brand-dark: #d84a00;
    --spec: #16a34a;
    --gen: #2563eb;
    --ensemble: #9333ea;
    --unresolved: #64748b;
    --bg: #f7f7f9;
    --surface: #ffffff;
    --ink: #1a1a1a;
    --ink-muted: #5b6474;
    --border: #e6e6ea;
    --success: #16a34a;
    --warn: #f59e0b;
    --error: #dc2626;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,.08);
    --radius: 10px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
code { background: #f0f0f2; padding: 1px 6px; border-radius: 4px; font-size: 0.9em; }

.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;
}

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: white;
    padding: 40px 20px 48px;
}
.hero-inner { max-width: 960px; margin: 0 auto; }
.hero h1 {
    font-size: clamp(28px, 4.5vw, 40px);
    margin: 0 0 14px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.hero-highlight { color: #ffd166; }
.hero-lede {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    max-width: 720px;
    margin: 0 0 24px;
}
.hero-lede b { color: #ffd166; }

/* --- Delta callout --- */
.delta-callout {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: var(--radius);
    padding: 16px 20px;
    max-width: 720px;
}
.delta-callout-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.delta-callout-value {
    font-size: 24px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap;
}
.delta-callout-value .delta-pos { color: #4ade80; }
.delta-callout-value .delta-neg { color: #f97316; }
.delta-callout-value .delta-zero { color: #cbd5e1; }
.delta-note {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
}
.delta-callout-hint { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 8px; }

/* --- Filter tabs --- */
.filters {
    max-width: 1200px;
    margin: 24px auto 8px;
    padding: 0 20px;
    display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--brand); color: var(--brand); }
.filter-btn.active { background: var(--brand); color: white; border-color: var(--brand); }

/* --- Cases wrap --- */
.cases-wrap {
    max-width: 1200px;
    margin: 12px auto 32px;
    padding: 0 20px;
    display: grid;
    gap: 20px;
}

.case-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.case-head { padding: 18px 20px 6px; }
.case-title {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 10px;
    font-size: 18px;
}
.case-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: white;
}
.case-badge--direct_success       { background: var(--spec); }
.case-badge--baseline_disagreement { background: var(--warn); }
.case-badge--crowd_multi_person    { background: #0891b2; }
.case-badge--branding_rejection    { background: var(--error); }
.case-badge--blur_occlusion        { background: var(--unresolved); }
.case-badge--correct_unresolved    { background: var(--ensemble); }
.case-cat-en {
    font-family: ui-monospace, "SF Mono", monospace;
    font-size: 12px;
    color: var(--ink-muted);
    background: #f0f0f2;
    padding: 2px 8px;
    border-radius: 4px;
}
.case-desc { color: var(--ink-muted); font-size: 14px; margin: 4px 0; }
.case-expected {
    font-size: 13px;
    color: var(--ink);
    margin: 8px 0 0;
    background: #f0f9ff;
    padding: 8px 12px;
    border-left: 3px solid #0891b2;
    border-radius: 4px;
}

/* --- Comparison columns --- */
.case-comparison {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px 20px 8px;
}
.comparison-column {
    display: flex; flex-direction: column;
    background: #fafafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    min-height: 200px;
}
.comparison-column h3 {
    font-size: 13px;
    margin: 0 0 8px;
    color: var(--ink);
    display: flex; align-items: center; gap: 8px;
}
.label-badge {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 999px;
    color: white;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.label-badge--spec     { background: var(--spec); }
.label-badge--gen      { background: var(--gen); }
.label-badge--ensemble { background: var(--ensemble); }

.comparison-column--original img {
    width: 100%; height: auto; border-radius: 6px; cursor: zoom-in;
}
.comparison-column--original img.load-error {
    background: #f0f0f0 url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 150"><rect fill="%23f0f0f0" width="200" height="150"/><text x="100" y="70" text-anchor="middle" fill="%23999" font-size="13">이미지 로드 실패</text></svg>') center/contain no-repeat;
    min-height: 150px;
}
.baseline-panel, .ensemble-panel {
    font-size: 12px;
    color: var(--ink);
}
.panel-loading { color: var(--ink-muted); font-style: italic; }
.region-list {
    list-style: none; padding: 0; margin: 8px 0 0;
}
.region-list li {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    background: white;
    border-left: 3px solid var(--border);
    font-family: ui-monospace, monospace;
    font-size: 11px;
}
.region-list li.tp { border-left-color: var(--success); background: #f0fdf4; }
.region-list li.fp { border-left-color: var(--error); background: #fef2f2; }
.region-list li.branding { border-left-color: var(--warn); background: #fffbeb; color: #92400e; }
.region-list li .digit { font-weight: 700; font-size: 13px; }
.region-list li .conf { color: var(--ink-muted); }

.verdict-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    margin: 4px 0;
}
.verdict-badge--BIB_CONFIRMED         { background: var(--success); }
.verdict-badge--FACE_RECOVERY         { background: #0891b2; }
.verdict-badge--CLOTHING_CORROBORATED { background: #9333ea; }
.verdict-badge--CONFLICT_REVIEW       { background: var(--warn); }
.verdict-badge--UNRESOLVED            { background: var(--unresolved); }
.verdict-bibs { font-family: ui-monospace, monospace; font-size: 12px; margin-top: 6px; color: var(--ink); }
.reason-short { font-size: 11px; color: var(--ink-muted); margin-top: 4px; font-style: italic; }

.case-attribution {
    padding: 8px 20px 14px;
    color: var(--ink-muted);
    border-top: 1px dashed var(--border);
    margin-top: 4px;
    font-size: 11px;
}

/* --- Lookup section --- */
.lookup-section {
    max-width: 720px;
    margin: 36px auto;
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.lookup-section h2 { margin: 0 0 8px; font-size: 20px; }
.lookup-note { color: var(--ink-muted); font-size: 13px; }
.lookup-form { display: flex; gap: 8px; margin-top: 12px; align-items: stretch; flex-wrap: wrap; }
.lookup-event { font-size: 12px; color: var(--ink-muted); width: 100%; margin-bottom: 4px; }
.lookup-form input {
    flex: 1; min-width: 160px;
    padding: 12px 14px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    outline: none;
}
.lookup-form input:focus { border-color: var(--brand); }
.lookup-form button {
    padding: 0 24px;
    background: var(--brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
}
.lookup-form button:hover { background: var(--brand-dark); }
.lookup-results { margin-top: 16px; padding: 12px; background: #f0f9ff; border-radius: 8px; font-size: 13px; }
.lookup-results.empty { background: #fef2f2; color: #7f1d1d; }
.lookup-results ul { list-style: none; padding: 0; margin: 8px 0 0; }
.lookup-results li { padding: 6px; border-bottom: 1px solid rgba(0,0,0,.05); }

/* --- Lookup presets --- */
.lookup-presets {
    margin-top: 14px;
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}
.lookup-presets--negative {
    background: #fefce8;
    border-color: #fde68a;
}
.lookup-preset-label {
    font-size: 12px;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.45;
}
.lookup-preset-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.preset-chip {
    background: white;
    color: var(--ink);
    border: 1px solid #86efac;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    transition: all 0.15s;
}
.preset-chip:hover { background: #dcfce7; border-color: #22c55e; }
.preset-chip--hero {
    background: #fef3c7;
    border-color: #fbbf24;
    color: #78350f;
}
.preset-chip--hero:hover { background: #fde68a; border-color: #f59e0b; }
.preset-chip--negative {
    background: white;
    border-color: #fbbf24;
    color: #78350f;
}
.preset-chip--negative:hover { background: #fef3c7; border-color: #f59e0b; }

/* --- Method section --- */
.method-section {
    max-width: 720px;
    margin: 32px auto;
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.method-section h2 { margin: 0 0 8px; font-size: 20px; }
.method-note { color: var(--ink-muted); font-size: 13px; }
.method-flow { padding-left: 20px; }
.method-flow li { margin-bottom: 6px; font-size: 14px; }

/* --- Modal --- */
.modal {
    padding: 0; border: none; border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    max-width: 90vw; max-height: 90vh; background: white;
    overflow: hidden;
}
.modal::backdrop { background: rgba(0,0,0,.7); }
.modal img { max-width: 90vw; max-height: 90vh; }
.modal-close {
    position: absolute; top: 8px; right: 8px;
    background: rgba(0,0,0,.5); color: white; border: none;
    width: 32px; height: 32px; border-radius: 50%; font-size: 16px; z-index: 10;
}

/* --- Footer --- */
.footer {
    text-align: center;
    padding: 32px 20px;
    color: var(--ink-muted);
    font-size: 12px;
    border-top: 1px solid var(--border);
    margin-top: 32px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .case-comparison { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .case-comparison { grid-template-columns: 1fr; }
    .hero { padding: 28px 16px 32px; }
    .cases-wrap { padding: 0 12px; }
}
