.thirty { max-width: 1240px; margin: 0 auto; padding: 36px 24px 70px; color: #202833; }
body#thirty_page .thirty_intro { display: block; padding: 32px 36px; border-radius: 12px; background: #edf5f8; border: 1px solid #d8e9ee; }
.thirty_intro h1 { margin: 4px 0 12px; font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.3; }
.thirty_intro p { margin: 0 0 8px; line-height: 1.7; }
.thirty_intro .thirty_eyebrow { color: #287385; font-weight: bold; font-size: .75rem; letter-spacing: .16em; }
.thirty_intro .thirty_note { color: #586b73; font-size: .88rem; margin-bottom: 0; }
.thirty_toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 28px 0 20px; }
.thirty_toolbar p { font-weight: bold; margin: 0; }
.thirty_toolbar_actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.thirty_toolbar .save_account { background: #fff; color: #19768b; border: 1px solid #19768b; }
.thirty button, .card_dialog button { cursor: pointer; font: inherit; }
.thirty_toolbar button, .thirty_bottom button, .search_form button { border: 0; border-radius: 6px; background: #19768b; color: #fff; font-weight: bold; padding: 12px 22px; }
.thirty button:disabled, .card_dialog button:disabled { opacity: .45; cursor: not-allowed; }
.thirty_grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 16px; }
.thirty_slot { min-width: 0; text-align: center; }
.thirty_slot p { margin: 8px 0 4px; font-size: .9rem; font-weight: bold; line-height: 1.45; }
.thirty_slot p span { color: #24798b; }
.slot_card { display: block; width: 100%; padding: 0; aspect-ratio: 5 / 7; border: 1px dashed #9fb9c0; border-radius: 7px; background: #f3f8f9; overflow: hidden; }
.slot_card:hover, .slot_card:focus-visible { outline: 3px solid #69bdc9; outline-offset: 2px; }
.slot_card img { display: block; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.slot_placeholder { display: flex; height: 100%; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #4f7b84; font-size: .86rem; }
.slot_placeholder b { font-size: 2rem; font-weight: normal; line-height: 1; }
.slot_clear { padding: 2px 4px; color: #66777c; border: 0; background: none; text-decoration: underline; font-size: .75rem !important; }
.slot_clear[hidden] { display: none; }
.thirty_status { color: #9b403d; min-height: 1em; }
.thirty_bottom { text-align: center; margin: 44px 0 0; }
.thirty_bottom p { font-size: .85rem; color: #64747b; }
.thirty_share { margin: 28px auto 0; padding: 20px; max-width: 540px; border-radius: 8px; background: #edf5f8; }
.thirty_share p { margin: 0 0 10px; line-height: 1.6; }
.thirty_share p:last-child { margin: 10px 0 0; }
.thirty_share a { display: inline-block; padding: 10px 22px; border-radius: 6px; background: #202833; color: #fff; font-weight: bold; text-decoration: none; }
.thirty_share a:hover, .thirty_share a:focus-visible { background: #364653; }
.card_dialog { position: fixed; inset: 0; margin: auto; overflow: auto; box-sizing: border-box; width: min(860px, calc(100% - 32px)); max-height: min(85vh, 900px); border: 0; border-radius: 12px; padding: 24px; color: #202833; box-shadow: 0 12px 50px #0005; }
.card_dialog::backdrop { background: #10232dbc; }
.dialog_heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog_heading h2 { margin: 2px 0 18px; font-size: 1.4rem; }
.dialog_heading p { color: #287385; margin: 0; font-size: .9rem; font-weight: bold; }
.close_dialog { border: 0; background: none; font-size: 2rem !important; line-height: 1; padding: 0 5px; }
.search_form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.search_form .search_text_field { flex: 1 1 180px; font-size: .85rem; font-weight: bold; }
.search_form input[type="search"] { box-sizing: border-box; display: block; width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #b7c6ca; border-radius: 5px; font: inherit; font-size: 16px; }
.search_form .search_colors { flex: 1 0 100%; box-sizing: border-box; min-width: 0; margin: 0; padding: 0; border: 0; }
.search_colors legend { padding: 0; margin-bottom: 7px; font-size: .85rem; font-weight: bold; }
/* 色と条件の選択は、サイトのカード検索と同じ形・配色にする。 */
.search_color_choices, .search_color_match { display: flex; flex-wrap: wrap; gap: 8px; }
.search_color_choices { margin-bottom: 8px; }
.search_color { --chip-color: #666; display: inline-flex; flex: 1; align-items: center; justify-content: center; min-height: 34px; padding: 8px 12px; border: 2px solid var(--chip-color); border-radius: 999px; color: var(--chip-color); background: #fff; font-size: 12px; font-weight: bold; line-height: 1.2; cursor: pointer; }
.search_color.color_1 { --chip-color: var(--colorpie_red, #c92c1f); }
.search_color.color_2 { --chip-color: var(--colorpie_blue, #3794da); }
.search_color.color_3 { --chip-color: var(--colorpie_white, #e6b02d); }
.search_color.color_4 { --chip-color: var(--colorpie_black, #755098); }
.search_color.color_5 { --chip-color: var(--colorpie_green, #68a250); }
.search_color.color_6 { --chip-color: var(--colorpie_none, #d84a88); }
.search_color input, .search_color_match input { margin: 0 5px 0 0; accent-color: var(--main_color, #755098); }
.search_color span { font: inherit; }
.search_color:has(input:checked) { color: #fff; background: var(--chip-color); }
.search_color:focus-within, .search_color_match label:focus-within { outline: 2px solid var(--main_color, #755098); outline-offset: 2px; }
.search_color_match label { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 8px 12px; border: 1px solid var(--app_border, #d0d0d0); border-radius: 999px; background: var(--app_surface_soft, #f4f5f8); color: var(--app_text, #202833); font-size: 12px; font-weight: bold; line-height: 1.2; cursor: pointer; }
.search_color_match label:has(input:checked) { color: #fff; background: var(--main_color, #755098); border-color: var(--main_color, #755098); box-shadow: 0 2px 8px rgba(22, 24, 34, .18); }
.search_color_match label:has(input:checked) input { accent-color: #fff; }
.search_hint, #search_status { font-size: .85rem; color: #607078; }
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.result_card { min-width: 0; border: 1px solid #d3e1e4; border-radius: 5px; background: #fff; padding: 5px; color: #394b51; }
.result_card:hover, .result_card:focus-visible { outline: 3px solid #69bdc9; }
.result_card img { display: block; width: 100%; aspect-ratio: 5 / 7; object-fit: contain; }
.result_card span { display: block; padding: 4px 0; font-size: .75rem; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .thirty { padding: 20px 12px 50px; }
    body#thirty_page .thirty_intro { display: block; padding: 22px 18px; }
    .thirty_grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 10px; }
    .thirty_slot p { font-size: .75rem; }
    .slot_placeholder { font-size: .7rem; }
    .thirty_toolbar { flex-direction: column; align-items: flex-start; }
    .thirty_toolbar_actions { justify-content: flex-start; }
    .thirty_toolbar button { padding: 10px 12px; font-size: .85rem; }
    .card_dialog { padding: 18px; }
    .search_color_choices { display: grid; grid-template-columns: repeat(4, max-content); }
    .search_color { flex: none; font-size: 9px; }
    .search_color_match label { font-size: 9px; }
    .results { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
