.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

.page-header_title {
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding-inline: 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    flex-shrink: 1;
    line-height: 1.2;
    min-width: 0px;
    color: rgb(50, 48, 44);
    &:hover {
        background-color: rgba(42, 28, 0, 0.07);
    }
}

.page-header_menus {
    position: relative;
    display: flex;
    align-items: center;
}

.page-header_user {
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    flex-shrink: 1;
    line-height: 1.2;
    min-width: 0px;
    color: rgba(70, 68, 64, 0.45);
    &:hover {
        background-color: rgba(42, 28, 0, 0.07);
    }
}

.page-header {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    height: 50px;
    display: flex;
    align-items: center;
    padding-inline: 12px 10px;

    display: flex;
    justify-content: space-between;
}

.page-header_edittime {
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    flex-shrink: 1;
    line-height: 1.2;
    min-width: 0px;
    color: rgba(70, 68, 64, 0.45);
    &:hover {
        background-color: rgba(42, 28, 0, 0.07);
    }
}
.page-footer {
    height: 50px;
    display: flex;
}
.page-main {
    flex-grow: 0;
    flex-shrink: 1;
    display: flex;
    flex-direction: column;
    background: rgb(255, 255, 255);
    z-index: 1;
    height: calc(-44px + 100vh);
    max-height: 100%;
    position: relative;
    padding-top: 20px;
    padding-bottom: 0px;
    width: 708px;
}

/* 모바일 (480px 이하) */
@media screen and (max-width: 720px) {
    .page-main {
        width: 100%;
        flex-direction: column;
        padding: 12px;
        height: auto;
    }
}

.page-icon {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease;
    display: flex;
    gap: 4px;
}

.page-menus:hover .page-icon {
    opacity: 1;
    visibility: visible;
}

.page-icon:hover {
    background-color: rgba(42, 28, 0, 0.07);
}

.page-icon.has-icon {
    opacity: 1 !important;
    visibility: visible !important;
    color: inherit !important;
}

.page-icon {
    user-select: none;
    transition: opacity 100ms;
    cursor: pointer;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding-inline: 8px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    flex-shrink: 0;
    line-height: 1.2;
    min-width: 0px;
    color: rgba(70, 68, 64, 0.45);
    pointer-events: auto;
}

.page-title {
    font-weight: 700;
    padding-top: 3px;
    padding-bottom: 0px;
    padding-inline: 2px;
    font-size: 36px;
    border: none;
    color: rgb(50, 48, 44);
    &::placeholder {
        color: rgba(55, 53, 47, 0.15);
    }
}

.page-introduce {
    min-height: 40px;
    flex: 1;
    overflow-y: auto;
    padding: 4px;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    padding-top: 8px;
    margin-top: 8px;
    white-space: pre-wrap;
    &:active {
        outline: none;
    }
}

.page-introduce:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
}

.title-modal {
    position: absolute;
    display: flex;
    align-items: center;
    color: rgb(50, 48, 44);
    font-size: 13px;
    padding: 4px 8px;
    top: 24px;
    border-radius: 10px;
    background: white;
    box-shadow:
        rgba(0, 0, 0, 0.1) 0px 14px 28px -6px,
        rgba(0, 0, 0, 0.06) 0px 2px 4px -1px,
        rgba(84, 72, 49, 0.08) 0px 0px 0px 1px;
    overflow: hidden;
    max-width: calc(-24px + 100vw);

    backdrop-filter: none;
    z-index: 100;
    min-width: 260px;
}

.title-modal_icon {
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    width: 28px;
    border-radius: 0.25em;
    flex-shrink: 0;
    margin-inline-end: 6px;
    flex-grow: 0;
    box-shadow: rgba(55, 53, 47, 0.16) 0px 0px 0px 1px inset;
    background: white;
}

.title-modal_input {
    padding-top: 4px;
    padding-bottom: 4px;
    padding-inline: 10px;
    border-radius: 4px;
    flex: 1;
    line-height: 20px;
    padding-top: 4px;
    padding-bottom: 4px;
    padding-inline: 10px;
    border-radius: 4px;
    box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px;
    background: rgba(242, 241, 238, 0.6);
    color: rgb(50, 48, 44);
    outline: none;
}

.title-modal_input:empty::before {
    content: attr(data-placeholder);
    color: #aaa;
}

.page-children {
    display: inline-flex;
    position: relative; /* 기준점 */
    flex-direction: column; /* 세로 쌓임 */
}

.page-children_header {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding-inline: 6px;
    border-radius: 6px;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1.2;
    color: rgba(70, 68, 64, 0.45);
    user-select: none;
    transition: background 20ms ease-in;
    cursor: pointer;
    flex-shrink: 1;
}
.page-children_header:hover {
    background-color: rgba(42, 28, 0, 0.07);
}

.page-children_header .icon-left,
.page-children_header .icon-right {
    display: inline-flex;
}

.page-children_header .icon-right {
    transition: transform 160ms ease;
}
.page-children_header:hover .icon-right,
.page-children:hover .page-children_header .icon-right {
    transform: rotate(180deg);
}

/* 리스트는 header 위로 */
.page-children_list {
    display: none;
    position: absolute;
    bottom: 100%; /* 헤더 위쪽 */
    left: 0;
    background: #fff; /* 배경 */
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: rgba(15, 15, 15, 0.1) 0px 0px 0px 1px;
    z-index: 10; /* 다른 요소 위로 */
    flex-direction: column;

    & > a {
        padding: 6px;
        width: 98px;
        font-size: 14px;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    & > a:hover {
        background-color: rgba(42, 28, 0, 0.07);
    }
}

/* hover 시 표시 */
.page-children_header:hover + .page-children_list,
.page-children:hover .page-children_list {
    display: flex;
}
