.tab-switch {
    --tab-color: #dbb6a2;
    max-width: 800px;
    margin: 0;

    display: flex;
    flex-wrap: wrap;
}

/* タブ */
.tab-switch label {
    padding: 0.7em 1em;
    background: #eee;
    cursor: pointer;
    margin-right: 5px;

    order: -1;
    /* ← タブを上に固定 */
}

/* ラジオ非表示 */
.tab-switch input {
    display: none;
}

/* コンテンツ（初期非表示） */
.tab-content {
    display: none;
    width: 100%;
    /* ← これで必ず下に行く */
    padding: 1.5em 0;
}

/* 選択中タブ */
.tab-switch label:has(:checked) {
    background: var(--tab-color);
    color: #fff;
}

/* 選択されたコンテンツだけ表示 */
.tab-switch label:has(:checked)+.tab-content {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

/* カード */
.item {
    background-color: #f5f5f5;
    height: 160px;
    width: 200px;
    border-radius: 12px;

    display: flex;
    justify-content: center;

    /* 影 */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* アニメーション */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

/* ホバー */
.item:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* クリック */
.item:active {
    transform: translateY(-2px);
}

/* タイトル */
.item h4 {
    display: flex;
    justify-content: center;
    align-items: center;

    margin-top: auto;
    margin-bottom: 10px;

    border-radius: 8px;
    height: 40px;
    width: 180px;

    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
}