body {
    margin: 0;
    font-family: sans-serif;
    background: #f5f5f5;
}
/*カード画像*/
.card img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    cursor:pointer;
}
/*カードでのダブルタップ防止（スマホ）*/
button,
.card {
    touch-action: manipulation;
    /*ダブルタップ防止*/
}

/*カードモノクロ化*/
.grayscale img {
    filter: grayscale(100%);
    opacity: 0.5;
}
/*所持マーク*/
.owned-mark {
    position: absolute;
    top: 1%;
    right: 1%;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    min-width: 25px;
    max-width: 35px;
    width: 23%;
    /* 画像の幅の20% */
    aspect-ratio: 1/1;
    /* 正円にする新しい方法 */
    display: none;
    font-size: 0.8em;
    /* 親要素に相対的 */
    line-height: 100%;
    /* 必要に応じて */
    text-align: center;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.card.owned .owned-mark {
    display: flex;
}
@media (max-width: 768px) {
    .owned-mark {
        min-width: 18px;
        width: 23%;
        font-size: 1.5em;
    }
}
@media (max-width: 560px) {
    .owned-mark {
        font-size: 1.25em;
    }
}
/*ヘッダー関連*/
.main-header {
    height: 3.5rem;
    background-image: url("../img/header.webp");
    background-repeat: repeat-x;
    /* 横方向に繰り返し */
    background-size: auto 55px;
    /* 高さ55pxにフィット */
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0px 5px;
    color: white;
    top: 0;
    z-index: 1000;
}

.header-logo img {
    height: 2.8rem;
    width: auto;
    margin-top: 10px;
    object-fit: contain;
}


.header-nav a {
    margin-left: 1rem;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(1.2rem, 2.6vw, 1.6rem);
    background-color: rgba(0, 0, 0, 0.4);
    padding: 6px 0.2em;
    border-radius: 6px;
    transition: background-color 0.3s;
}
@media (max-width: 768px) {
    .header-nav a {
        font-size: 1.05rem;
        font-size: clamp(.6rem, 2.45vw, 1.05rem);
    }
}
@media (max-width: 560px) {
    .header-nav a {
        margin-left: 0.1rem;
    }
}

.header-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    /* 軽いホバー効果 */
    text-decoration: none;
}

.header-nav a.active-page {
    background-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
}


/*上部に戻るボタン*/
#scrollTopFixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    aspect-ratio: 1/1;
    padding: 0;
    font-size: 25px;
    background-color: #eee;
    border-radius: 50%;
    border: 1px solid #aaa;
    cursor: pointer;
    z-index: 1500;
}



/* ======== フッター ======== */
footer {
    text-align: center;
    font-size: clamp(10px, 1vw, 1rem);
    color: #666;
    padding: 3vw 0;
    background-color: #f9f9f9;
    line-height: 1.6;
}

footer a {
    color: #3366cc;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}