:root { 
    --picker-height: 100px; 
    --item-height: 33.3px; 
}
body { 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; 
    height: 100vh; 
    overflow: hidden; 
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.swiper { width: 100%; height: 100%; }
.content-wrapper { padding: 16px; height: 100%; display: flex; flex-direction: column; }

/* 피커 스타일 */
.picker-container { position: relative; height: var(--picker-height); background: #f3f4f6; border-radius: 12px; overflow: hidden; display: flex; mask-image: linear-gradient(to bottom, transparent, black 40%, black 60%, transparent); }
.picker-center-bar { position: absolute; top: 50%; left: 0; width: 100%; height: var(--item-height); background: rgba(59, 130, 246, 0.1); transform: translateY(-50%); pointer-events: none; border-top: 1px solid rgba(59, 130, 246, 0.2); border-bottom: 1px solid rgba(59, 130, 246, 0.2); }
.picker-column { flex: 1; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; z-index: 1; }
.picker-column::-webkit-scrollbar { display: none; }
.picker-item { height: var(--item-height); display: flex; align-items: center; justify-content: center; font-size: 13px; color: #9ca3af; scroll-snap-align: center; }
.picker-item.active { color: #2563eb; font-weight: bold; font-size: 15px; }
.picker-item.empty { height: var(--item-height); }

/* 냉장고 시각화 (수정됨: 6x8 격자 및 굵은 구분선) */
.fridge-container { 
    width: 100%; 
    flex: 1; 
    background-color: #f8fafc; 
    border: 4px solid #e2e8f0; 
    border-radius: 16px; 
    position: relative; 
    overflow: hidden; 
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
    
    /* 배경 선 그리기 (굵은 선 3개만 표시) */
    background-image: 
        /* 가로선 1: 위에서 2번째 칸 아래 (25% 지점) */
        linear-gradient(to right, #94a3b8 100%, transparent 0),
        /* 가로선 2: 위에서 4번째 칸 아래 (50% 지점) */
        linear-gradient(to right, #94a3b8 100%, transparent 0),
        /* 세로선 1: 좌측에서 3번째 칸 오른쪽 (50% 지점) */
        linear-gradient(to bottom, #94a3b8 100%, transparent 0);
    
    background-size: 
        100% 4px, /* 가로선 두께 */
        100% 4px, 
        4px 100%; /* 세로선 두께 */
        
    background-position: 
        0 25%, /* 2행 끝 (2/8) */
        0 50%, /* 4행 끝 (4/8) */
        50% 0; /* 3열 끝 (3/6) */
        
    background-repeat: no-repeat;
}

/* 쿠킹 존 */
.cooking-zone {
    height: 80px;
    margin-top: 8px;
    background-color: #fff7ed; 
    border: 2px dashed #fb923c;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 4px;
    gap: 4px;
    overflow-x: auto;
    position: relative;
}
.cooking-zone.drag-over {
    background-color: #ffedd5;
    border-color: #ea580c;
}

/* 드래그 아이템 (너비 수정됨) */
.fridge-item { 
    position: absolute; 
    width: 15.5%; /* 6열 기준에 맞춰 너비 축소 (100/6 = 16.6% -> 여백 고려 15.5%) */
    height: 11.5%; /* 8행 기준 (100/8 = 12.5% -> 여백 고려 11.5%) */
    border-radius: 6px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    font-size: 9px; 
    font-weight: bold; 
    color: white; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    cursor: grab; 
    user-select: none; 
    touch-action: none; 
    z-index: 10; 
    transition: transform 0.1s, box-shadow 0.1s; 
}
.fridge-item:active { cursor: grabbing; transform: scale(1.1); z-index: 50; }

/* 쿠킹 존 내부 아이템 */
.cooking-zone .fridge-item {
    position: relative !important;
    width: 50px !important;
    height: 50px !important;
    left: auto !important;
    top: auto !important;
    flex-shrink: 0;
    margin: 0 2px;
}

/* 레시피 카드 */
.recipe-scroll { display: flex; flex-direction: column; overflow-y: auto; gap: 8px; padding-bottom: 10px; }
.recipe-scroll::-webkit-scrollbar { display: none; }
.recipe-card {
    display: block; width: 100%; height: 120px; flex-shrink: 0; 
    position: relative; border-radius: 10px; overflow: hidden; 
    background-color: #e5e7eb; background-size: cover; background-position: center; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); cursor: pointer; transition: transform 0.1s;
}
.recipe-card:active { transform: scale(0.98); }

.loader { border-top-color: #3b82f6; animation: spinner 0.6s linear infinite; }
@keyframes spinner { to { transform: rotate(360deg); } }