/* ============== 페이스 계산기 ============== */

.pace-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pace-back-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #333;
    text-decoration: none;
    border-radius: 50%;
    transition: background 0.2s;
}

.pace-back-btn:active { background: #f0f0f0; }

.pace-page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

.pace-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px 16px 100px;
}

/* 모드 탭 */
.pace-tabs {
    display: flex;
    background: #f1f3f5;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 24px;
}

.pace-tab {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #868e96;
    cursor: pointer;
    transition: all 0.2s;
}

.pace-tab.active {
    background: #fff;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 입력 카드 */
.pace-input-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.pace-input-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px 0;
}

.pace-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pace-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pace-input-group label {
    font-size: 0.75rem;
    color: #868e96;
    margin-bottom: 6px;
    font-weight: 600;
}

.pace-input-group input {
    width: 100%;
    text-align: center;
    padding: 14px 8px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    background: #f8f9fa;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.pace-input-group input:focus {
    outline: none;
    border-color: #047857;
    background: #fff;
}

.pace-input-sep {
    font-size: 1.5rem;
    font-weight: 700;
    color: #adb5bd;
    margin-top: 20px;
}

.pace-calc-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #047857, #059669);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: opacity 0.2s;
}

.pace-calc-btn:active {
    opacity: 0.85;
}

/* 커스텀 거리 입력 */
.pace-custom-distance {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.pace-custom-distance label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    display: block;
    margin-bottom: 8px;
}

.pace-custom-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pace-custom-row input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    background: #f8f9fa;
    box-sizing: border-box;
}

.pace-custom-row input:focus {
    outline: none;
    border-color: #047857;
    background: #fff;
}

.pace-custom-row span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #868e96;
}

/* 결과 영역 */
.pace-results {
    display: none;
}

.pace-results.show {
    display: block;
}

.pace-results-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #495057;
    margin-bottom: 12px;
}

.pace-result-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.pace-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
}

.pace-result-item:last-child {
    border-bottom: none;
}

.pace-result-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
}

.pace-result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #047857;
}

.pace-result-item.custom {
    background: #ecfdf5;
}

.pace-result-item.custom .pace-result-label {
    color: #047857;
}

/* 타임→페이스 결과 */
.pace-result-pace {
    background: #fff;
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.pace-result-pace-value {
    font-size: 2.4rem;
    font-weight: 800;
    color: #047857;
    margin-bottom: 4px;
}

.pace-result-pace-unit {
    font-size: 0.85rem;
    color: #868e96;
    font-weight: 600;
}

.pace-result-pace-detail {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #868e96;
}

/* 시간→페이스 거리 선택 */
.pace-distance-select {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.pace-distance-btn {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    background: #fff;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s;
}

.pace-distance-btn.active {
    border-color: #047857;
    background: #ecfdf5;
    color: #047857;
}

.pace-distance-btn:active {
    transform: scale(0.95);
}

/* 안내 텍스트 */
.pace-info {
    margin-top: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #868e96;
    line-height: 1.6;
}
