/* 체중 기록 팝업 (footer2) */
.wrp-dim {
    position: fixed;
    inset: 0;
    z-index: 9286;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.wrp-dim.open {
    opacity: 1;
    pointer-events: auto;
}

.wrp-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9311;
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 32px rgba(15, 23, 42, 0.22);
    transform: translateY(105%);
    transition: transform 0.24s ease;
    max-width: 560px;
    margin: 0 auto;
    max-height: min(88vh, 720px);
    display: flex;
    flex-direction: column;
}

.wrp-sheet.open {
    transform: translateY(0);
}

.wrp-handle {
    width: 48px;
    height: 5px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 10px auto 8px;
    flex-shrink: 0;
}

.wrp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px 10px;
    border-bottom: 1px solid #eef2f7;
    flex-shrink: 0;
}

.wrp-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.wrp-sub {
    margin: 2px 0 0;
    font-size: 12px;
    color: #64748b;
}

.wrp-pet-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

.wrp-pet-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: transform 0.2s ease, background 0.2s ease;
}

.wrp-pet-dots span.is-active {
    background: #7c6bb8;
    transform: scale(1.25);
}

.wrp-close {
    border: none;
    background: #f1f5f9;
    color: #334155;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.wrp-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    overflow: hidden;
    padding: 12px 16px 8px;
}

.wrp-swipe-zone {
    touch-action: pan-y;
    transition: transform 0.2s ease, opacity 0.2s ease;
    will-change: transform;
    flex-shrink: 0;
}

.wrp-swipe-zone.is-dragging {
    transition: none;
}

.wrp-swipe-zone.swipe-to-prev {
    animation: wrpSwipeFlashPrev 0.28s ease;
}

.wrp-swipe-zone.swipe-to-next {
    animation: wrpSwipeFlashNext 0.28s ease;
}

@keyframes wrpSwipeFlashPrev {
    0% { transform: translateX(0); opacity: 1; }
    40% { transform: translateX(14px); opacity: 0.85; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes wrpSwipeFlashNext {
    0% { transform: translateX(0); opacity: 1; }
    40% { transform: translateX(-14px); opacity: 0.85; }
    100% { transform: translateX(0); opacity: 1; }
}

.wrp-swipe-hint {
    margin: 0 0 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.wrp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    padding: 12px 10px;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8f7fc 0%, #f1f5f9 100%);
    border: 1px solid #e8e4f4;
}

.wrp-scale {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0d4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7c6bb8;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(124, 107, 184, 0.15);
}

.wrp-current {
    font-size: 36px;
    font-weight: 900;
    color: #406cb4;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.wrp-diff {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
}

.wrp-diff.is-up {
    color: #dc2626;
}

.wrp-diff.is-down {
    color: #2563eb;
}

.wrp-diff.is-flat {
    color: #64748b;
}

.wrp-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 4px;
}

.wrp-stat {
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

.wrp-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    margin-bottom: 4px;
}

.wrp-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #334155;
}

.wrp-stat-value.is-goal {
    color: #7c6bb8;
}

.wrp-stat-sub {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #94a3b8;
}

.wrp-input-card {
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px;
    background: #f8fafc;
    margin-bottom: 8px;
    overflow: hidden;
    box-sizing: border-box;
}

.wrp-input-row {
    display: grid;
    grid-template-columns: minmax(84px, 96px) minmax(0, 1fr);
    gap: 8px;
    align-items: end;
    margin-bottom: 8px;
}

.wrp-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.wrp-field--grow {
    min-width: 0;
}

.wrp-field-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

/* 인풋+단위 박스: common.css .cfl-field-box 사용 */

.wrp-save {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 12px;
    background: #7c6bb8;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

.wrp-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wrp-records {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 4px;
}

.wrp-records-title {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.wrp-records-list {
    display: grid;
    gap: 6px;
}

.wrp-record-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
}

.wrp-record-val {
    font-weight: 800;
    color: #406cb4;
}

.wrp-record-delete {
    border: none;
    background: #fef2f2;
    color: #dc2626;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.wrp-records-empty {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    padding: 8px;
}

.wrp-foot {
    flex-shrink: 0;
    padding: 8px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eef2f7;
    text-align: center;
}

.wrp-foot-link {
    font-size: 12px;
    font-weight: 700;
    color: #7c6bb8;
    text-decoration: none;
}
