/* ==== ダイアログ共通 ==== */
.dialog-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ==== メインログインダイアログ ==== */
.dialog-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 320px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    text-align: center;
    animation: fadeIn 0.2s ease;
}
.dialog-box h2 {
    margin-bottom: 12px;
}
.dialog-box input {
    display: block;
    width: 90%;
    margin: 6px 0;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.dialog-box button {
    margin: 8px 4px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.dialog-box .primary { background: #007bff; color: #fff; }
.dialog-box .secondary { background: #ccc; }
.dialog-box button:disabled {
    background-color: #ccc;
    color: #666;
    border-color: #aaa;
}
.dialog-box button.link {
    background: none;
    color: #007bff;
    margin-top: 0;
    margin-bottom: 8px;
    padding: 0;
}
.dialog-box button.link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* ==== 制限ダイアログ ==== */
.dialog-small {
    background: #fff;
    border-radius: 10px;
    padding: 18px;
    width: 280px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* ==== アニメーション ==== */
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }


/* ==== ヘッダバー部分 ==== */
/* ヘッダバー全体 */
header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: center;
    background-color: #f5f5f5;   /* 薄いグレー背景 */
    padding: 8px 16px;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    color: #333;
}

/* 「○○ さん、ようこそ！」部分 */
header .user-name {
    flex-grow: 1;
    min-width: 0;
    margin-right: 0;
    font-weight: 500;
}

/* リンクナビ */
header nav {
    flex-grow: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: end;
}

header a {
    white-space: nowrap;
    margin-left: 6px;
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

header a:hover {
    text-decoration: underline;
    color: #0056b3;
}

header a:active {
    color: #004085;
}

/* ==== フッタバー部分 ==== */
/* フッタバー用の body と main の設定 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* 保険として */
}
main {
    flex: 1 0 auto; /* 重要: これで main が残りの高さを占める */
}

/* フッタバー全体 */
footer {
    background-color: #f5f5f5;   /* 薄いグレー背景 */
    padding: 8px 16px;
    font-size: 14px;
    border-top: 1px solid #ddd;
    color: #333;
}

/* リンクナビ */
footer nav {
   text-align: center;
}

footer a {
    display: inline-block;
    margin-left: 4px;
    margin-right: 4px;
    color: #007bff;
    text-decoration: none;
    font-size: 13px;
}

footer a:hover {
    text-decoration: underline;
    color: #0056b3;
}

footer a:active {
    color: #004085;
}
