/*==========================
    共通ヘッダー
==========================*/

.page-header{
    position:relative;
    z-index:1000;
    padding-top:env(safe-area-inset-top);
    display:flex;
    flex-shrink:0;
    width:100%;
    min-height:56px;
    box-sizing:border-box;
    background:rgba(255,255,255,.97);
    border-bottom:1px solid var(--theme-border-soft);
    box-shadow:0 2px 8px rgba(var(--theme-brand-rgb),.05);
}

.page-header-inner{
    position:relative;
    width:100%;
    box-sizing:border-box;
}

/*==========================
    タイトル
==========================*/

.page-header h1{
    margin:0;
    color:var(--theme-text);
    font-size:18px;
    font-weight:bold;
    line-height:1.2;
    text-align:center;
}

.page-header p{
    display:none;
    margin:4px 0 0;
    color:#888;
    font-size:13px;
    line-height:1.4;
    text-align:center;
}

/*==========================
    戻る
==========================*/

.page-header-back{
    display:flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    margin:0;
    color:#555;
    text-decoration:none;
    font-size:28px;
    line-height:1;
}

/*==========================
    メニュー
==========================*/

.menu-button{
    display:flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    margin:0;
    padding:0;
    box-sizing:border-box;
    border:0;
    border-radius:20px;
    background:#fff0f5;
    color:#e83e8c;
    font-family:inherit;
    font-size:23px;
    font-weight:bold;
    line-height:1;
    cursor:pointer;
}

.menu-button:active{
    transform:scale(.94);
}

/*==========================
    PC
==========================*/

@media(min-width:768px){
    .page-header{
        min-height:80px;
        padding:calc(20px + env(safe-area-inset-top)) 30px 20px;
    }

    .page-header-inner{
        width:100%;
        margin:0;
    }

    .page-header h1{
        font-size:28px;
        line-height:1.4;
        text-align:left;
    }

    .page-header p{
        display:block;
        margin:4px 0 0;
        font-size:13px;
        text-align:left;
    }

    .page-header-back{
        display:none;
    }

    /* PCではサイドナビを主導線とするため、ページ内メニューボタンは表示しない */
    .menu-button{
        display:none;
    }
}

/*==========================
    スマートフォン
==========================*/

@media(max-width:767px){
    .page-header{
        min-height:54px;
        padding:0 12px;
        padding-top:env(safe-area-inset-top);
    }

    .page-header-inner{
        display:grid;
        grid-template-columns:40px minmax(0,1fr) 40px;
        align-items:center;
        min-height:54px;
    }

    .page-header h1{
        grid-column:2;
        min-width:0;
        font-size:17px;
        line-height:1.2;
        white-space:nowrap;
        text-align:center;
    }

    .page-header p{
        display:none;
    }

    .page-header-back{
        grid-column:1;
        width:40px;
        height:40px;
        font-size:27px;
    }

    .menu-button{
        grid-column:3;
        justify-self:end;
        width:40px;
        height:40px;
        border-radius:20px;
        font-size:23px;
    }
}