:root {
    --fc27-bg: #f4f7fb;
    --fc27-paper: #fff;
    --fc27-ink: #172033;
    --fc27-muted: #64748b;
    --fc27-line: #dbe3ef;
    --fc27-primary: #2563eb;
    --fc27-primary-dark: #1d4ed8;
    --fc27-success: #047857;
    --fc27-warning: #b45309;
    --fc27-danger: #b91c1c;
    --fc27-body-start: #f8fbff;
    --fc27-field-bg: #fff;
    --fc27-soft: #f8fafc;
    --fc27-result-bg: #fbfdff;
    --fc27-selected-border: #93c5fd;
    --fc27-selected-text: #1e3a8a;
    --fc27-selected-label: #3b82f6;
    --fc27-selected-meta: #475569;
    --fc27-status-bg: #f1f5f9;
    --fc27-success-bg: #ecfdf5;
    --fc27-danger-bg: #fef2f2;
    --fc27-info: #1e40af;
    --fc27-info-bg: #eff6ff;
    --fc27-linked: #7c3aed;
    --fc27-linked-bg: #f5f3ff;
    --fc27-shadow: 0 12px 30px rgba(15, 23, 42, .06);
    --fc27-hero-shadow: 0 20px 45px rgba(15, 23, 42, .12);
}

[data-theme="dark"] {
    color-scheme: dark;
    --fc27-bg: #0f172a;
    --fc27-paper: #1e293b;
    --fc27-ink: #e5edf7;
    --fc27-muted: #9aa8bc;
    --fc27-line: #334155;
    --fc27-primary: #3b82f6;
    --fc27-primary-dark: #2563eb;
    --fc27-success: #4ade80;
    --fc27-warning: #fbbf24;
    --fc27-danger: #f87171;
    --fc27-body-start: #111827;
    --fc27-field-bg: #0f172a;
    --fc27-soft: #162033;
    --fc27-result-bg: #172235;
    --fc27-selected-border: #3b82f6;
    --fc27-selected-text: #dbeafe;
    --fc27-selected-label: #93c5fd;
    --fc27-selected-meta: #cbd5e1;
    --fc27-status-bg: #334155;
    --fc27-success-bg: #064e3b;
    --fc27-danger-bg: #450a0a;
    --fc27-info: #93c5fd;
    --fc27-info-bg: #172554;
    --fc27-linked: #c4b5fd;
    --fc27-linked-bg: #312e81;
    --fc27-shadow: 0 12px 30px rgba(0, 0, 0, .22);
    --fc27-hero-shadow: 0 20px 45px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--fc27-ink);
    background: linear-gradient(180deg, var(--fc27-body-start) 0%, var(--fc27-bg) 100%);
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
button, input, select, textarea { font: inherit; }
.fc27-page { width: min(980px, calc(100% - 32px)); margin: 0 auto 48px; }
.fc27-hero {
    margin: 22px 0 16px;
    padding: 28px;
    border-radius: 22px;
    color: #f8fafc;
    background: linear-gradient(135deg, #0f172a 0%, #155e75 58%, #2563eb 100%);
    box-shadow: var(--fc27-hero-shadow);
}
.fc27-hero h1 { margin: 0 0 9px; font-size: clamp(1.55rem, 3vw, 2.15rem); }
.fc27-hero p { margin: 0; color: rgba(248, 250, 252, .86); line-height: 1.7; }
.fc27-hero p + p { margin-top: 6px; }
.fc27-grid { display: grid; gap: 16px; }
.fc27-card {
    padding: 22px;
    border: 1px solid var(--fc27-line);
    border-radius: 18px;
    background: var(--fc27-paper);
    box-shadow: var(--fc27-shadow);
}
.fc27-card h2, .fc27-card h3 { margin: 0 0 8px; }
.fc27-card h2 { font-size: 1.12rem; }
.fc27-card h3 { font-size: 1rem; }
.fc27-hint { color: var(--fc27-muted); font-size: .88rem; line-height: 1.65; }
.fc27-search-warning { margin-top: 4px; color: var(--fc27-warning); font-weight: 750; }
.fc27-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.fc27-field { display: grid; gap: 7px; }
.fc27-field.full { grid-column: 1 / -1; }
.fc27-field label { font-weight: 850; font-size: .9rem; }
.fc27-field input, .fc27-field select, .fc27-field textarea, .fc27-search-row input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--fc27-line);
    border-radius: 11px;
    color: var(--fc27-ink);
    background: var(--fc27-field-bg);
}
.fc27-field textarea { min-height: 104px; resize: vertical; }
.fc27-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.fc27-actions.collection-actions { justify-content: space-between; }
.fc27-button, .fc27-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 15px;
    border: 1px solid var(--fc27-line);
    border-radius: 11px;
    color: var(--fc27-ink);
    background: var(--fc27-field-bg);
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}
.fc27-button.primary { border-color: var(--fc27-primary); color: #fff; background: var(--fc27-primary); }
.fc27-button.primary:hover { background: var(--fc27-primary-dark); }
.fc27-button:disabled { cursor: not-allowed; opacity: .55; }
.fc27-alert { display: none; margin-top: 15px; padding: 12px 14px; border-radius: 11px; line-height: 1.55; }
.fc27-alert.show { display: block; }
.fc27-alert.success { color: var(--fc27-success); background: var(--fc27-success-bg); }
.fc27-alert.error { color: var(--fc27-danger); background: var(--fc27-danger-bg); }
.fc27-alert.info { color: var(--fc27-info); background: var(--fc27-info-bg); }
.fc27-team-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.fc27-summary-item { padding: 14px; border: 1px solid var(--fc27-line); border-radius: 13px; background: var(--fc27-soft); }
.fc27-summary-item span { display: block; color: var(--fc27-muted); font-size: .78rem; font-weight: 800; }
.fc27-summary-item strong { display: block; margin-top: 5px; font-size: .97rem; }
.fc27-team-hero { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 14px; border: 1px solid var(--fc27-line); border-radius: 13px; background: var(--fc27-soft); }
.fc27-team-emblem { width: 64px; height: 64px; flex: 0 0 64px; object-fit: contain; border-radius: 14px; background: var(--fc27-field-bg); border: 1px solid var(--fc27-line); }
.fc27-team-hero strong { display: block; color: var(--fc27-ink); font-size: 1.05rem; }
.fc27-search-row { display: flex; gap: 9px; margin-top: 14px; }
.fc27-search-row input { flex: 1; }
.fc27-search-results { display: grid; gap: 8px; margin-top: 12px; }
.fc27-club-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--fc27-line); border-radius: 12px; background: var(--fc27-result-bg); }
.fc27-club-result strong { display: block; }
.fc27-club-result .meta { margin-top: 4px; color: var(--fc27-muted); font-size: .82rem; }
.fc27-selected-club { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 14px; border: 1px solid var(--fc27-selected-border); border-radius: 12px; color: var(--fc27-selected-text); background: var(--fc27-info-bg); }
.fc27-selected-label { display: block; margin-bottom: 4px; color: var(--fc27-selected-label); font-size: .78rem; font-weight: 850; }
.fc27-selected-club strong { display: block; color: var(--fc27-ink); }
.fc27-selected-club .meta { margin-top: 4px; color: var(--fc27-selected-meta); font-size: .82rem; }
.fc27-status { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; color: var(--fc27-muted); background: var(--fc27-status-bg); font-size: .75rem; font-weight: 850; white-space: nowrap; }
.fc27-status.active { color: var(--fc27-success); background: var(--fc27-success-bg); }
.fc27-status.linked { color: var(--fc27-linked); background: var(--fc27-linked-bg); }
.fc27-footer-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
@media (max-width: 700px) {
    .fc27-page { width: min(100% - 20px, 980px); }
    .fc27-hero, .fc27-card { padding: 18px; }
    .fc27-form-grid, .fc27-team-summary { grid-template-columns: 1fr; }
    .fc27-field.full { grid-column: auto; }
    .fc27-search-row { flex-direction: column; }
    .fc27-club-result { align-items: flex-start; flex-direction: column; }
    .fc27-selected-club { align-items: flex-start; flex-direction: column; }
}
