#top.container {
    max-width: 1300px;
    width: 90%;
    margin: 0 auto;
}

#top {
    padding-bottom: 200px;
}

#top .container {
    background: transparent !important;
    padding: 0px !important;
}

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

.buttons_wrapper {
    display: flex;
    gap: 50px;
    padding: 30px 0px;
}

.search_deck,
.create_deck {
    font-size: 20px;
    width: 300px;
    max-width: 45%;
    padding: 10px 20px;
    color: white;
    border-radius: 4px;
    border: none;
    position: relative;
    background-color: #bf0000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 250px;
    box-sizing: border-box;
}

.search_deck:hover {
    opacity: 0.7;
}

.search_deck .search-icon,
.create_deck .vector-icon {
    position: absolute;
    left: 20px;
    width: 14px;
    height: 14px;
}

.change-energy-type-list:hover,
.change-latest-list:hover {
    background-color: rgba(191, 0, 0, 0.1);
    color: #bf0000;
}

.deck_genres {
    display: flex;
    gap: 20px;
    margin: 15px 0px;
}

#top .subtitle {
    margin-bottom: 10px;
}

.deck-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 34px;
    margin-bottom: 50px;
}

.deck-card {
    display: block;
    position: relative;
    width: 100%;
    height: 147px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.deck-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    object-position: 0px -30px;
    transform: scale(1.5);
}

.deck-card:hover {
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

.overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.overlay span {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    padding: 0px 0px 5px 5px;
}

/* 新着デッキ用のオーバーレイ */
.new-deck-overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
}

.deck-info-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.deck-name {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.deck-author {
    color: #fff;
    font-size: 14px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.deck-regulation {
    align-self: flex-end;
}

.regulation-badge {
    background-color: #bf0000;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.link_more {
    font-size: 16px;
    width: 300px;
    max-width: 90%;
    padding: 20px 34px;
    color: white;
    border-radius: 5px;
    border: none;
    background-color: #bf9d4c;
    text-align: center;
}

.link_more.last {
    margin-bottom: 0px;
}

.link_more:hover {
    opacity: 0.7;
}

.search_deck_wrapper,
.search_result_wrapper {
    margin-bottom: 50px;
}

.search_result_wrapper .right_wrapper {
    padding-top: 32px;

    @media (max-width: 1080px) {
        padding-top: 10px;
    }
}

/* デッキ検索結果カード */
.search_result_wrapper .result_cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.deck-result-card {
    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    color: #333;
}

.deck-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.deck-result-card .deck-image {
    width: 30%;
    flex-shrink: 0;
    overflow: hidden;
}

.deck-result-card .deck-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 245 / 130;
    object-position: 0px -30px;
    transform: scale(1.5);

    @media (max-width: 1080px) {
        object-position: 0 30px;
        transform: scale(4);
    }
}

.deck-result-card .deck-info {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.deck-result-card .deck-header {
    margin-bottom: 8px;
}

.deck-result-card .deck-badges {
    display: flex;
    gap: 8px;
}

.deck-result-card .badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.deck-result-card .badge-regulation {
    background-color: #bf0000;
}

.deck-result-card .badge-type {
    background-color: #8d8d8d;
}

.deck-result-card .deck-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0 0 8px 0;
    color: #333;
}

.deck-result-card .deck-meta {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: bold;
}

.deck-result-card .deck-user {
    display: flex;
    align-items: center;
    gap: 4px;
}

.deck-result-card .star {
    color: #333;
    font-size: 14px;
}

.deck-result-card .deck-dates {
    gap: 15px;
    display: flex;
}

.search_result_wrapper .result_cards {
    margin-top: 25px;

    @media (max-width: 1080px) {
        padding-right: 0;
        padding-left: 0;
    }
}

.deck-result-card .deck-date {
    line-height: 1.4;
}

/* サブタブナビゲーション */
.search_detail_wrapper,
.search_result_wrapper {
    position: relative;

    @media (max-width: 1080px) {
        margin: 0 2.6%;
    }
}

.search_detail_wrapper .subtitle,
.search_result_wrapper .subtitle {
    margin-bottom: 0;
    padding-bottom: 0;

    @media (max-width: 1080px) {
        margin: 40px 0 0 0;
        font-size: 20px;
    }
}

.sub_tabnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #000000;
}

.sub_tabnav_left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.sub_tab_item {
    font-size: 14px;
    color: black;
    background-color: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition:
        color 0.3s ease,
        border-bottom-color 0.3s ease;
}

a.sub_tab_item:hover {
    color: #bf0000;
}

.sub_tab_item.active {
    color: #bf0000;
    border-bottom-color: #bf0000;
}

.sub_tabnav_right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;

    @media (max-width: 1080px) {
        position: absolute;
        top: -50px;
        right: 2.6%;
    }
}

.deck_purchase_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #bf0000;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.deck_purchase_btn:hover {
    text-decoration: none;
}

.deck_purchase_btn img {
    width: 20px;
    height: auto;
}

.deck_purchase_btn:hover {
    background-color: #a00000;
}

.deck_purchase_btn .btn_icon {
    font-size: 16px;
}

/* ハンバーガーメニュー */
.hamburger_menu_btn {
    display: flex;
    border: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    padding: 8px;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
}

.hamburger_menu_btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    border-color: #bf0000;
}

.hamburger_line {
    display: block;
    width: 18px;
    height: 2px;
    background-color: #333;
    margin: 2px 0;
    transition:
        background-color 0.3s ease,
        transform 0.3s ease;
}

.hamburger_menu_btn:hover .hamburger_line {
    background-color: #bf0000;
}

.hamburger_menu_btn.active .hamburger_line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger_menu_btn.active .hamburger_line:nth-child(2) {
    opacity: 0;
}

.hamburger_menu_btn.active .hamburger_line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ハンバーガーメニューのアニメーション */
.hamburger_menu_btn.btn_close .hamburger_line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 4px);
}

.hamburger_menu_btn.btn_close .hamburger_line:nth-child(2) {
    opacity: 0;
}

.hamburger_menu_btn.btn_close .hamburger_line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -3px);
}

/* ハンバーガーメニュー ドロップダウン */
.hamburger_menu_wrapper {
    position: relative;
}

.hamburger_dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.hamburger_dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown_item {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    font-weight: bold;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.dropdown_item:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.dropdown_item:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown_item:hover {
    background-color: #f8f9fa;
}

/* デッキ構成 */
.deck_composition {
    margin-top: 30px;
}

.card_category {
    margin-bottom: 15px;
}

.category_title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: inline-block;
}

.card_list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 15px;
}

.card_item {
    position: relative;
    width: 130px;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card_item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card_count {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    min-width: 16px;
    text-align: center;
}

/* デッキ情報 */
.deck_info {
    margin-top: 40px;
    border-radius: 8px;
}

.deck_info_title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    padding-bottom: 10px;
}

.deck_info_table {
    width: 100%;
    display: flex;
    gap: 44px;

    @media screen and (max-width: 1080px) {
        flex-direction: column;
        gap: 0;
    }

}

.deck_info_table table {
    flex: 1;
}

.deck_info_table th,
.deck_info_table td {
    padding: 20px 0 10px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}
}

.deck_info_table th {
    width: 30%;
}

.deck_info_table td {
    width: 70%;
}

.deck_info_table td a {
    color: #bf0000;
    font-weight: bold;
    text-decoration: underline;
}

/* カード追加インターフェース */
.card_input_section {
    margin: 30px 0;
}

.card_input_wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.card_name_input_wrapper {
    flex: 1;
    margin-right: 30px;
    box-sizing: border-box;
    width: calc(100% - 30px);
    position: relative;

    @media screen and (max-width: 1080px) {
        margin-right: 0;
        min-width: 100%;
    }
}

.card_name_input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #000000;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.card_name_input:focus {
    outline: none;
    border-color: #bf0000;
}

.card_select_modal {
    position: absolute;
    top: unset;
    left: unset;
    background: none;
    display: block;
    padding: 0;
}

.card_select_modal .modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 4px;
}

.card_select_modal .modal-body {
    padding: 0;
}

.card_select_modal .modal-body>div {
    min-height: 50px;
    max-height: 50vh;
    overflow: scroll;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
}

.card_select_modal .modal-body>div.loading {
    justify-content: center;
}

.card_select_modal .modal-body>div.empty {
    align-items: center;
    justify-content: center;
}

.card_select_modal .modal-body>div.empty:after {
    content: "カードが存在しません。"
}

.card_select_modal .modal-body>div button {
    border: none;
    text-align: left;
    font-size: 1rem;
    padding: 5px 10px;
    background: none;
}

.card_select_modal .modal-body>div button:hover {
    color: #bf0000;
}

.quantity_controls {
    display: flex;
    align-items: center;
    gap: 10px;

    @media screen and (max-width: 1080px) {
        width: 44%;
    }
}

.quantity_label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    white-space: nowrap;
}

.quantity_input_wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.quantity_btn {
    width: 36px;
    height: 36px;
    border: none;
    background-color: #f5f5f5;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity_btn:hover {
    background-color: #e0e0e0;
}

.quantity_input {
    width: 60px;
    height: 36px;
    border: none;
    text-align: center;
    font-size: 16px;
    background-color: white;
}

.quantity_input:focus {
    outline: none;
}

.quantity-control {
    padding: 8px 10px;
    width: 100%;

    @media screen and (max-width: 1080px) {
        padding: 8px 5px;
    }
}

.quantity-control button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
}

.add_card_btn {
    margin: 0 15px 0 30px;
    padding: 0 24px;
    line-height: 40px;
    background-color: #bf9d4c;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;

    @media screen and (max-width: 1080px) {
        margin: 0 0 0 2%;
        padding: 0;
        width: 25.2%;
        font-size: 13px;
    }
}

.add_card_btn:hover {
    background-color: #a5843a;
}

.detail_search_btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.detail_search_btn:hover {
    background-color: #5a6268;
}

.detail_search_btn .search_icon {
    width: 16px;
    height: 16px;
    filter: invert(1);
}

.search_result_wrapper .search_form_box .subtitle {
    border-bottom: none;
}

.search_result_wrapper .search_form_box .search_form:last-child {
    margin-bottom: 30px;
}

.card_input_section .btn_white {
    margin: 0;
    height: 40px;
    white-space: nowrap;

    @media screen and (max-width: 1080px) {
        margin: 0 0 0 2%;
        padding: 0;
        width: 25.2%;
        height: auto;
        font-size: 13px;
    }
}

.card_input_controls_row {
    display: flex;
    align-items: center;

    @media screen and (max-width: 1080px) {
        flex-wrap: wrap;
        align-items: stretch;
        width: 100%;
    }
}




/* カード追加ガイド */
.card_guide_section {
    margin: 50px 0 80px 0px;
    border-radius: 12px;
    overflow: hidden;
    text-align: center;
}

.card_guide_header {
    background-color: #fed96b;
    padding: 15px 0px;
}

.card_guide_title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.card_guide_content {
    font-weight: bold;
    background-color: white;
    padding: 20px;
    margin: 0 auto;
}

.card_guide_text {
    font-size: 16px;
    color: #333;
    margin: 8px 0;
    line-height: 1.6;
}

.subtitle.border_none {
    border-bottom: none;
    padding-bottom: 0;
}

@media screen and (max-width: 1080px) {
    .card_guide_section {
        margin: 30px 0;
    }

    .card_guide_title {
        font-size: 20px;
    }
}

/* パンくずリスト */
.breadcrumb {
    display: flex;
    align-items: center;
    margin: 25px 0;
    font-size: 12px;
    gap: 8px;
}

.breadcrumb_item {
    color: #333;
    text-decoration: none;
}

.breadcrumb_item:hover {
    color: #333;
    text-decoration: none;
}

.breadcrumb_separator {
    color: #999;
    font-size: 10px;
}

.breadcrumb_current {
    color: #333;
    font-weight: bold;
}

/* デッキに戻るボタン */
.deck_back_btn_wrapper {
    margin-bottom: 0;
}

.search_condition_text {
    margin: 20px 0;
    font-size: 14px;
    color: #333;
}

@media screen and (max-width: 1080px) {
    .search_condition_text {
        margin: 20px 20px;
    }
}

/* カードグリッド表示 */
.card_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 25px;
    margin-bottom: 30px;
}

.search_result_wrapper .card_grid {
    margin: 25px 20px 30px;

    @media (max-width: 1080px) {
        margin-right: 0;
        margin-left: 0;
    }
}

.card_grid_item_wrapper {
    position: relative;
    display: flex;
    gap: 10px;
}

.card_grid_item {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card_grid_item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.card_grid_image {
    width: 100%;
    height: 100%;
}

.card_grid_count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 20px;
    text-align: center;
}

/* カードアクションドロップダウン */
.card_action_dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    margin-left: 10px;
    max-width: 200px;
    width: max-content;
    min-width: 180px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
    padding: 15px;
}

/* 親が右スレスレに配置されてたら左側に出す(jsで判定) */
.card_action_dropdown.is_left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 10px;
}

/* SP表示時は下に配置 */
@media screen and (max-width: 1080px) {
    .card_action_dropdown {
        top: 100%;
        left: 0;
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }

    .card_grid_item_wrapper {
        flex-direction: column;
    }
}

.quantity_controls_dropdown {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.quantity_controls_dropdown .quantity-btn {
    width: 30px;
    height: 36px;
    border: none;
    background-color: #f5f5f5;
    color: #333;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.quantity_controls_dropdown .quantity-btn:hover {
    background-color: #e0e0e0;
}

.quantity_display {
    box-sizing: border-box;
    min-width: 30px;
    height: 30px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    border: none;
}

.dropdown_action_item {
    display: block;
    font-weight: bold;
    padding: 12px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.3s ease;
}

.dropdown_action_item:last-child {
    border-bottom: none;
}

.dropdown_action_item:hover {
    background-color: #f8f9fa;
}

.deck_back_btn {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: transparent;
    color: #333;
    border: 1px solid black;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease;
    width: 100%;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
}

.deck_back_btn .back_icon {
    position: absolute;
    left: 20px;
}

.deck_back_btn:hover {
    background-color: #e0e0e0;
    text-decoration: none;
}

@media screen and (max-width: 1080px) {
    .deck_back_btn {
        margin: 0 20px;
        width: calc(100% - 40px);
    }
}

/* カードリスト表 */
.card_list_table {
    margin: 30px 0 60px;
    display: flex;

    @media screen and (max-width: 1080px) {
        flex-direction: column;
        margin: 0 2.6% 60px;
    }
}

.card_list_table table {
    flex: 1;
    border-right: 1px solid #bf9d4c;
    border-bottom: 1px solid #bf9d4c;

    @media screen and (max-width: 1080px) {
        border: none;
    }
}

.card_list_table table:last-child {
    border-right: none;
}

.card_list_table th {
    background-color: #fed96b;
    color: #333;
    font-weight: bold;
    padding: 15px 10px;
    text-align: left;
    font-size: 16px;
}

.card_list_table th:last-child {
    border-right: none;
}

.card_list_table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px dotted #bf9d4c;
    font-size: 14px;
    color: #333;
}

.card_list_table tr:last-child td {
    border-bottom: none;
}

.card_list_table .card_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 2rem;
}

.card_list_table .card_name {
    flex: 1;
    text-align: left;
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.card_list_table .card_list_count {
    font-weight: bold;
    color: black;
    font-size: 12px;
    text-align: right;
    margin-left: 10px;
}

.purchase_table {
    margin-top: 30px;

    @media screen and (max-width: 1080px) {
        margin-right: 2.6%;
        margin-left: 2.6%;
    }
}

.purchase_table table {
    @media screen and (max-width: 1080px) {
        margin-bottom: 30px !important;
    }
}

.purchase_table .btn {
    width: 270px;
    margin: 0 auto;
}

.search_deck_wrapper .notation_table tr:first-child th,
.notation_table tr:first-child td {
    border-top: 1px solid #bf9d4c;
}



/* レスポンシブ表示制御 */
.genre_select {
    width: 100%;
    padding: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    font-size: 16px;
    background-color: transparent;
    cursor: pointer;
}

@media (max-width: 1080px) {
    #top {
        padding-bottom: 30px;
    }

    #top.container {
        width: 100%;
        margin-bottom: 0px;
    }

    .buttons_wrapper {
        flex-direction: column;
        gap: 20px;
        padding: 0px 0px 30px;
        width: calc(100% - 5.2%);
    }

    .search_deck,
    .create_deck {
        width: 100%;
        max-width: 100%;
    }

    .deck_genres {
        display: none !important;
    }

    .deck_genres_dropdown {
        margin: 15px 20px;
    }

    .deck-grid {
        margin: 0px 20px 30px;
    }

    .search_deck_wrapper,
    .search_result_wrapper {
        margin-bottom: 0px;
    }

    .link_more {
        margin-bottom: 30px;
    }

    .link_more.last {
        margin-bottom: 0px;
    }
}

/* 新着デッキ用のオーバーレイ */
.new-deck-overlay {
    position: absolute;
    bottom: 50px;
    left: 15px;
    display: flex;
    align-items: flex-end;
}

.deck-info-left {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.deck-name {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.deck-author {
    color: #fff;
    font-size: 14px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.deck-bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: flex-start;
}

.regulation-badge {
    background-color: #bf0000;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

/* 詳細検索モーダル専用スタイル */
.date-range {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-input {
    flex: 1;
    min-width: 0;
}

.date-separator {
    font-weight: bold;
    color: #666;
    font-size: 16px;
}

.card-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.card-input {
    flex: 1;
    min-width: 0;
    position: relative;
}

.btn-add {
    background-color: white;
    color: red;
    border: 1px solid red;
    padding: 14px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background-color: rgb(255, 245, 245);
}

#selected-placement {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

#selected-placement>div {
    background: #dedede;
    padding: 5px;
    font-size: 0.8rem;
    border-radius: 5px;
    display: flex;
}

#selected-placement>div button {
    border: none;
    background: none;
    padding-left: 12px;
    font-size: 1.5rem;
    line-height: 0.8rem;
}

.checkbox-group.deck-count {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
}

.checkbox-group.deck-count label {
    margin-right: 20px;
    margin-bottom: 12px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal !important;
    font-size: 16px;
}

.checkbox-item input[type="checkbox"] {
    margin: 0 5px;
    cursor: pointer;
}

@media (max-width: 1080px) {
    .date-range {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .date-separator {
        text-align: center;
        font-size: 14px;
    }

    .card-input-wrapper {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .btn-add {
        width: 100%;
    }

    .checkbox-group.deck-count {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .date-input {
        font-size: 16px;
        padding: 14px 12px;
    }

    .btn-add {
        padding: 16px 20px;
        font-size: 15px;
    }

    .checkbox-item {
        font-size: 15px;
    }
}

@media (max-width: 1080px) {
    .search_deck_wrapper .notation_table.sp_only td {
        padding-top: 15px;
    }

    .notation_table table {
        margin-bottom: 0px;
    }
}
