/* Picks — minimal CSS */

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-secondary: #666;
    --border: #e0e0e0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #16a34a;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout */
.container {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}
header .inner {
    max-width: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header .logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}
header nav { display: flex; gap: 1rem; align-items: center; }
header nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}
header nav a:hover { color: var(--text); }

/* Typography */
h1 { font-size: 1.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; margin-bottom: 0.75rem; }
p { margin-bottom: 0.75rem; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.card h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.card .meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Forms */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    margin-bottom: 0.75rem;
    background: var(--surface);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}
textarea { resize: vertical; min-height: 80px; }

.form-group { margin-bottom: 1rem; }
.form-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.form-row input[type="text"]:first-child { flex: 1; }
.form-row input[type="text"]:last-child { flex: 1; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: var(--danger-hover); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Ranked list */
.ranked-list {
    list-style: none;
    counter-reset: rank;
}
.ranked-list li {
    counter-increment: rank;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.375rem;
    background: var(--surface);
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}
.ranked-list li::before {
    content: counter(rank) ".";
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 1.5rem;
}
.item-name { font-weight: 500; }
.item-note {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

/* Sortable items (edit form) */
.sortable-item {
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.375rem;
    background: var(--surface);
    cursor: grab;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.sortable-item .handle {
    color: var(--text-secondary);
    cursor: grab;
    user-select: none;
    font-size: 1.1rem;
}
.sortable-item input {
    margin-bottom: 0;
}
.sortable-item .item-fields {
    flex: 1;
    display: flex;
    gap: 0.5rem;
}
.sortable-item .item-fields input:first-child { flex: 2; }
.sortable-item .item-fields input:last-child { flex: 1; }
.sortable-item .remove-btn {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
}

/* Aggregation */
.agg-item {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    background: var(--surface);
}
.agg-item .agg-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.agg-item .agg-name { font-weight: 600; }
.agg-item .agg-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.agg-item .agg-attributions {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Visibility badge */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-private { background: #fef2f2; color: var(--danger); }
.badge-request { background: #fefce8; color: #a16207; }
.badge-link { background: #eff6ff; color: var(--primary); }

/* Alert */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe; }

/* Empty state */
.empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* Section divider */
.section { margin-top: 2rem; }

/* Responsive */
@media (max-width: 480px) {
    .container { padding: 1rem 0.75rem; }
    .form-row { flex-direction: column; }
    .sortable-item .item-fields { flex-direction: column; }
}
