/* Picture cards in the lists' 条件を設定 (search-cards.php), laid out as the map's search dialog lays
   them out (map-article-ui.css): two or four a row on a computer, one row that scrolls sideways on a phone. */
.rk-search-cards { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; padding: 3px; }
.rk-search-cards .rk-search-card { position: relative; display: block; box-sizing: border-box; flex: 0 0 calc((100% - 10px) / 2); width: calc((100% - 10px) / 2); min-width: 0; min-height: 0; margin: 0; padding: 0; border: 2px solid #d2dce3; border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; }
.rk-search-cards .rk-search-card-wide { flex-basis: 100%; width: 100%; }
.rk-search-cards .rk-search-card:has(input:checked) { border-color: #0088ff; box-shadow: 0 0 0 1px #0088ff; }
.rk-search-cards .rk-search-card:focus-within { outline: 3px solid #176da4; outline-offset: -3px; }
.rk-search-cards .rk-search-card input[type="checkbox"] { position: absolute; top: 8px; left: 8px; z-index: 1; width: 22px; height: 22px; margin: 0; border-radius: 3px; background: #fff; box-shadow: 0 0 0 3px #fff; accent-color: #0088ff; opacity: 1; appearance: auto; }
.rk-search-cards-popular .rk-search-card input[type="checkbox"] { left: auto; right: 8px; }
.rk-search-card-image { display: block; position: relative; width: 100%; overflow: hidden; }
.rk-search-card-image img { display: block; width: 100%; max-width: none; height: auto; margin: 0; padding: 0; border: 0; }
/* A card whose own picture cannot load shows its region of the guide picture (search-cards.js). */
.rk-search-card-cropped img { position: absolute; }
.rk-search-card-name { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rk-search-cards .rk-search-card-text { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; margin: 0; padding: 8px 10px; border: 1px solid #dce6ee; border-radius: 7px; background: #fff; color: #3d5369; font-size: 13px; cursor: pointer; }
legend .rk-search-guide-button { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; box-sizing: border-box; width: 28px; height: 28px; margin: 0 0 0 8px; padding: 0; border: 1px solid #9db5c5; border-radius: 50%; background: #eaf5fc; color: #176da4; font: inherit; font-size: 15px; font-weight: bold; line-height: 1; cursor: pointer; }
legend .rk-search-guide-button:focus-visible { outline: 3px solid #176da4; outline-offset: 2px; }
@media (min-width: 1025px) and (pointer: fine) {
    .rk-search-cards-four .rk-search-card { flex-basis: calc((100% - 30px) / 4); width: calc((100% - 30px) / 4); }
}
@media (max-width: 1024px), (pointer: coarse) {
    .rk-search-cards { flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 8px; scrollbar-width: thin; }
    .rk-search-cards .rk-search-card { flex: 0 0 260px; width: 260px; }
    .rk-search-cards .rk-search-card-wide { flex-basis: 530px; width: 530px; }
    .rk-search-cards .rk-search-card-text { flex: 0 0 auto; white-space: nowrap; }
}

/* The guide behind a ? button, as the map's (#map-area-guide). */
.rk-search-guide { box-sizing: border-box; width: min(960px, calc(100% - 24px)); max-width: none; max-height: calc(100dvh - 24px); margin: auto; padding: 0; border: 0; border-radius: 12px; background: #fff; color: #172b3a; overflow: hidden; font-size: 15px; line-height: 1.5; }
.rk-search-guide[open] { display: flex; flex-direction: column; }
.rk-search-guide::backdrop { background: #142c42b3; }
.rk-search-guide-heading { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #e1e7eb; }
.rk-search-guide-heading p { margin: 0; font-size: 18px; font-weight: 700; }
.rk-search-guide-heading div { display: flex; align-items: center; gap: 8px; }
.rk-search-guide button { min-height: 40px; margin: 0; padding: 6px 12px; border: 1px solid #b5c3cc; border-radius: 6px; background: #fff; color: #172b3a; font: inherit; cursor: pointer; }
.rk-search-guide .rk-search-guide-close { width: 40px; padding: 0; border: 0; border-radius: 50%; background: #edf2f5; font-size: 26px; }
.rk-search-guide :focus-visible { outline: 3px solid #176da4; outline-offset: -3px; }
.rk-search-guide-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.rk-search-guide picture { display: block; width: 100%; }
.rk-search-guide img { display: block; width: 100%; max-width: none; height: auto; margin: 0; padding: 0; border: 0; }
.rk-search-guide-expanded picture { width: 1024px; }
