/* ── Ski Profile View ─────────────────────────────────────── */
.skiprofile-layout { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }
.skiprofile-header { margin-bottom: 1.5rem; }
.skiprofile-header h1 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.skiprofile-header p { color: var(--t3); font-size: 0.85rem; }

.skiprofile-form { max-width: 680px; }

/* Sections */
.sp-section { margin-bottom: 2rem; }
.sp-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}
.sp-hint { color: var(--t3); font-size: 0.78rem; margin-bottom: 0.75rem; }

/* ── Ability Cards ────────────────────────────────────────── */
.sp-ability-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
}

.sp-ability-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.9rem 0.5rem;
    background: var(--bg-3);
    border: 2px solid var(--bdr);
    border-radius: var(--r-m);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.sp-ability-card:hover {
    border-color: var(--bdr-h);
    background: var(--bg-4);
}
.sp-ability-card.active {
    border-color: var(--acc);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}
.sp-ability-icon { font-size: 1.4rem; }
.sp-ability-title {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--t1);
}
.sp-ability-desc {
    font-size: 0.68rem;
    color: var(--t3);
    line-height: 1.3;
}

/* Inferred ability hint */
.sp-inferred {
    margin-top: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.15);
    border-radius: var(--r-s);
    font-size: 0.75rem;
    color: var(--t2);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.sp-inferred-label { color: var(--t3); }
.sp-inferred-value { font-weight: 600; }

/* ── Experience field ─────────────────────────────────────── */
.sp-field-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.sp-field-row label {
    font-size: 0.82rem;
    color: var(--t2);
    min-width: 8rem;
}
.sp-field-row input[type="number"] {
    width: 5rem;
    background: var(--bg-3);
    border: 1px solid var(--bdr);
    border-radius: var(--r-s);
    padding: 0.4rem 0.6rem;
    color: var(--t1);
    font-size: 0.85rem;
    font-family: inherit;
}
.sp-field-row input[type="number"]:focus {
    outline: none;
    border-color: var(--acc);
}

/* ── Terrain Sliders ──────────────────────────────────────── */
.sp-terrain-grid {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sp-terrain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0.75rem;
    background: var(--bg-3);
    border: 1px solid var(--bdr);
    border-radius: var(--r-m);
    transition: border-color 0.15s;
}
.sp-terrain-item:hover {
    border-color: var(--bdr-h);
}

.sp-terrain-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 10rem;
}
.sp-terrain-icon { font-size: 1.1rem; flex-shrink: 0; }
.sp-terrain-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--t1);
    display: block;
}
.sp-terrain-desc {
    font-size: 0.68rem;
    color: var(--t3);
    display: block;
}

.sp-terrain-control {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.sp-terrain-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 4px;
    background: var(--bdr);
    border-radius: 2px;
    outline: none;
}
.sp-terrain-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--acc);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 6px rgba(56, 189, 248, 0.3);
}
.sp-terrain-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--acc);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.sp-terrain-val {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--acc);
    min-width: 4.5rem;
    text-align: right;
}

/* ── Difficulty Range ─────────────────────────────────────── */
.sp-diff-range {
    display: flex;
    gap: 2rem;
}
.sp-diff-select {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.sp-diff-option {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-3);
    border: 1px solid var(--bdr);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--t2);
    cursor: pointer;
    transition: all 0.15s;
}
.sp-diff-option:hover {
    border-color: var(--bdr-h);
}
.sp-diff-option:has(input:checked) {
    border-color: var(--acc);
    color: var(--acc);
    background: rgba(56, 189, 248, 0.08);
}
.sp-diff-radio {
    display: none;
}

/* ── Save Button ──────────────────────────────────────────── */
.sp-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 2rem;
}
.sp-save-btn {
    padding: 0.65rem 2rem;
    background: linear-gradient(135deg, var(--acc), var(--acc2));
    border: none;
    border-radius: var(--r-m);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(56, 189, 248, 0.2);
}
.sp-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(56, 189, 248, 0.3);
}
.sp-save-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.sp-save-status { font-size: 0.8rem; }
.sp-saved { color: var(--green); }
.sp-error { color: var(--blk); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .skiprofile-layout { padding: 1rem; }
    .sp-ability-grid { grid-template-columns: repeat(2, 1fr); }
    .sp-terrain-item { flex-direction: column; align-items: stretch; gap: 0.4rem; }
    .sp-terrain-control { justify-content: space-between; }
    .sp-diff-range { flex-direction: column; gap: 0.75rem; }
    .sp-terrain-slider { width: 100%; flex: 1; }
    .sp-discipline-row { flex-direction: column; gap: 0.75rem; }
}

.sp-discipline-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}
.sp-discipline-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    padding: 0.9rem 0.5rem;
    background: var(--bg-3);
    border: 2px solid var(--bdr);
    border-radius: var(--r-m);
    cursor: pointer;
    transition: all 0.2s;
}
.sp-discipline-card:hover { border-color: var(--bdr-h); background: var(--bg-4); }
.sp-discipline-card.active {
    border-color: var(--acc);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}
.sp-discipline-icon { font-size: 1.6rem; }
.sp-discipline-title { font-weight: 700; font-size: 0.85rem; color: var(--t1); }

.sp-discipline-row {
    display: flex;
    gap: 2rem;
}
.sp-discipline-group { flex: 1; }
.sp-discipline-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--t2);
    margin-bottom: 0.4rem;
}
.sp-optional { color: var(--t3); font-weight: 400; }