/* --- 플로팅 액션 버튼 (FAB) 영역 --- */
.fab-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.fab-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.fab {
    width: 50px;
    height: 50px;
    background: #15273f;
    /* 밤하늘 색상과 맞춰서 어색함 방지 */
    border: 3px solid #d4a373;
    /* 테두리를 버튼 컨테이너로 이동 */
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-sizing: border-box;
    overflow: hidden;
    /* 이미지 탈출 방지 */
}

.fab img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    transition: transform 0.2s;
    display: block;
}

.fab:hover {
    transform: scale(1.05);
}

.fab:hover img {
    transform: rotate(-10deg);
}

/* --- FAB 서브 메뉴 --- */
.fab-menu {
    position: absolute;
    top: 62px;
    right: 0;
    /* 자주 쓰는 일기 기능은 화면 안쪽, 보조 기능은 리모콘 아래쪽에 둔다. */
    display: grid;
    grid-template-columns: repeat(2, 50px);
    grid-template-areas:
        "photo pomodoro"
        "text profile"
        "five-line ."
        "memo .";
    gap: 12px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-12px) scale(0.96);
    transform-origin: top right;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-wrapper.open .fab-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#fab-sub-photo {
    grid-area: photo;
}

#fab-sub-pomodoro {
    grid-area: pomodoro;
}

#fab-sub-text {
    grid-area: text;
}

#fab-sub-profile {
    grid-area: profile;
}

#fab-sub-5line {
    grid-area: five-line;
}

#fab-sub-memo {
    grid-area: memo;
}

.fab-wrapper.open .fab {
    transform: rotate(45deg);
}

.fab-sub-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid #d4a373;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    padding: 0;
    overflow: hidden;
    /* 아이콘 이탈 방지 */
}

.fab-sub-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
    /* 7px -> 2px로 대폭 축소하여 아이콘 크기를 극대화 */
}

.fab-sub-btn:hover {
    transform: scale(1.1);
    background-color: #fdfdfd;
}

#fab-sub-5line {
    color: navy;
    font-family: 'GangwonEdu_OTFBoldA', sans-serif;
    font-size: 24px;
    font-weight: 900;
}

#fab-photo-input {
    display: none;
}

#fab-sub-pomodoro img {
    padding: 2px;
}
