* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    /*
    outline: none;
    caret-color: transparent;
    */
}


html,
body {
    height: 100%;
    font-family: 'Noto Sans JP', sans-serif;
    font-weight: 400;
    color: #222;
    background: #E0F4FF;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 30;
}

.brand {
    font-weight: 700;
    letter-spacing: .02em;
    text-decoration: none;
    color: inherit;
    /* 親要素の色を引き継ぐ */
    font-weight: bold;
    /* 必要なら */
    margin-left: 5px;
}

/* ハンバーガー */
.hamburger {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: transparent;
    border: none;
}

.hamburger .bar {
    display: block;
    width: 28px;
    height: 3px;
    background: #222;
    margin: 5px 0;
    transition: transform .3s ease, opacity .3s ease;
    border-radius: 2px;
}

.hamburger[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.hamburger[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    /* 横幅を100%に固定 */
    box-sizing: border-box;
    padding-top: 64px;
}

nav.side {
    width: 220px;
    position: fixed;
    top: 64px;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 1rem;
    background: #fafafa;
    border-right: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 20;
}

nav.side a {
    padding: .5rem .75rem;
    text-decoration: none;
    color: #222;
    border-radius: 8px;
}

nav.side a:hover {
    background: rgba(0, 0, 0, 0.04);
}

nav.side .spacer {
    flex: 1
}

nav.side a:last-of-type {
    margin-bottom: 30px;
}

main.content {
    flex: 1 1 auto;
    margin-left: 200px;
    padding-top: 1.5rem;

    flex-direction: column;
    display: flex;
    /* 横中央 */
}

.page-title {
    display: inline-block;
    /* 中央寄せ可能に */
    margin: 0 auto;
    /* 親の中で中央配置 */
    text-align: center;
    /* 文字は左寄せ */
    margin-bottom: 20px;
}

.mobile-menu {
    display: block;
    position: fixed;
    top: 64px;
    left: 0;
    width: 75%;
    max-width: 300px;
    bottom: 0;
    background: #fff;
    padding: 1rem;
    overflow-y: auto;
    z-index: 25;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    /* ← 非表示状態 */
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu.open {
    transform: translateX(0);
    opacity: 1;
}

.mobile-menu a {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    color: #222;
}

.mobile-menu a+a {
    margin-top: .5rem
}

.page-title .br {
    display: inline;
}




/* モーダル背景 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 80px auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    left: 100px;
}

.modal-content ol {
    margin-left: 20px;
}

.modal-content span {
    margin-right: 4px;
}

.modal-close {
    position: absolute;
    /* ← 相対配置の中で絶対配置 */
    top: 0rem;
    /* 上からの距離 */
    right: 0.4rem;
    /* 右からの距離 */
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
}


.modal-close:hover {
    color: #000;
}

.modal h4 {
    margin: 0.5em 0;
}

.modal h5 {
    margin: 0.5em 0;
}

details summary {
    cursor: pointer;
    font-weight: bold;
    margin: 0.5em 0;
}

details[open]:not(.details-header) summary {
    color: #007acc;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    margin-top: 5px;
    margin-right: 0.5rem;
    border-radius: 9999px;
    /* pill型に */
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    color: #fff;
    background: linear-gradient(135deg, #4a90e2, #357ab7);
    transition: transform 0.15s, box-shadow 0.15s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    height: auto;
    width: 160px;
    justify-content: center;
    /* pill型に合わせて可変 */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.guide-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #5aa0f0, #468bd0);
}

.guide-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #3a74a8, #2d5b85);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

input[type="checkbox"]:checked+span {
    color: #007acc;
    font-weight: bold;
}

.checked-custom {
    color: inherit !important;
    /* JSで切り替わる色 */
    font-weight: normal !important;
}




/* メイン系（生成・DL・ULまとめる） */
.btn-main {
    background: #4DB6E6;
    /* 明るめブルー */
    color: #fff;
}

.btn-main:hover {
    background: #318FBF;
    /* 少し濃いブルー */
}

/* 全体リセット（危険操作なので赤系で差別化） */
.btn-reset {
    background: #EF9A9A;
    /* サーモンピンク */
    color: #fff;
}

.btn-reset:hover {
    background: #E57373;
}

/* サブ（部分リセット・その他） */
.btn-sub {
    background: #CFD8DC;
    /* 薄いグレー */
    color: #333;
}

.btn-sub:hover {
    background: #B0BEC5;
}

/* 無効状態 */
.btn-main:disabled,
.btn-sub:disabled,
.btn-reset:disabled {
    background: #B0DFE8;
    /* 淡い水色グレー */
    color: #eee;
    opacity: 0.7;
    cursor: not-allowed !important;
}

img {
    -webkit-user-drag: none;
    /* Chrome, Safari */
    -khtml-user-drag: none;
    /* 古いSafari */
    -moz-user-drag: none;
    /* Firefox */
    -o-user-drag: none;
    /* Opera */
    user-drag: none;
    /* 標準 */
}

@media (max-width: 1500px) {

    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .modal-content {
        left: 0;
    }

    nav.side {
        display: none;
    }

    main.content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        /* ← 横幅を画面幅にフィット */
        max-width: 100%;
        display: flex;
        justify-content: flex-start;
        /* ← 横方向の中央揃え */
    }
}

@media (max-width: 600px) {
    .page-title .br {
        display: block;
    }
}

@media (max-width: 420px) {
    header {
        height: 56px
    }

    .layout {
        padding-top: 56px
    }

    main.content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        /* ← 横幅を画面幅にフィット */
        max-width: 100%;
        display: flex;
        justify-content: center;
        /* ← 横方向の中央揃え */
    }

    .mobile-menu {
        top: 56px
    }
}