body {
    font-family: "Sawarabi Gothic", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.filter-btn {
    padding: 4px 8px;
    margin: 2px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
}

.filter-btn.active {
    background: #689366;
    color: white;
    border-color: #689366;
}

/* スマホ：1列表示 */
@media (max-width: 767px) {
    #cards {
        display: flex;
        flex-direction: column;
    }

    .card-wrapper {
        padding: 20px;
        margin: 80px auto;
    }
}

.card {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 6px;
    border-radius: 6px;
}

/* タブレット：2列表示 */
@media (min-width: 768px) and (max-width: 1023px) {
    #cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .card-wrapper {
        padding: 20px;
        margin: 80px auto;
    }
}

/* PC：3列表示 */
@media (min-width: 1024px) {
    #cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-wrapper {
        padding: 20px 320px 20px 20px;
        margin: 80px auto;
    }

}


.card h3 {
    margin-bottom: 1rem;
}

.card a {
    background: #689366;
    padding: .5rem;
    display: block;
    width: fit-content;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    margin-top: 2rem;
}

.card p {
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 2px;
    background: #eee;
    border-radius: 4px;
    font-size: 0.9em;
}

.search-wrapper {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background: #f3ece1;
    padding: 5rem 1rem;
}

.search-wrapper .scroll {
    overflow-y: auto;
    flex: 1;
}

.search-wrapper .scroll::-webkit-scrollbar {
    display: none;
}

.search-wrapper h2 {
    color: #636464;
}

.search-wrapper input {
    background: white;
    border: 1px solid #689366;
    height: 3rem;
}

.search-wrapper input[type="text"]:focus {
    outline: 1px solid #bacb96;
}


/* モバイル: 初期非表示 */
@media (max-width: 768px) {
    .search-wrapper {
        position: fixed;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        border-radius: 10px;
        transform: translate(-50%, -50%);
        transition: all 0.4s ease;
        z-index: 1000;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        opacity: 0;
        pointer-events: none;
    }


    .search-wrapper.active {
        width: 100%;
        height: 100vh;
        border-radius: 0;
        opacity: 1;
        pointer-events: auto;
    }


    #filter-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        cursor: pointer;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
        background: #689366;
        color: #fff;
        font-size: 12px;

    }

    /* スクロール */
    .search-wrapper .scroll {
        overflow-y: auto;
        flex: 1;
        padding: 10px;
    }

    /* 閉じるボタン */
    .filter-close {
        position: fixed;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
        background: #ff4444;
        color: #fff;
        border: none;
        border-radius: 50%;
        width: 50px;
        height: 50px;
        cursor: pointer;
        z-index: 1002;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
}

/* PCではボタン非表示 */
@media (min-width: 769px) {

    .filter-btn-sibo,
    .filter-close {
        display: none;
    }
}