/* Property archive */
.p-property-archive__breadcrumb {
    padding-top: 0;
}

.p-property-archive__breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    color: #6d7887;
    font-size: 1.1rem;
}

.p-property-archive__breadcrumb a {
    color: inherit;
}

.p-property-archive__content {
    padding-top: 11.5rem;
    padding-bottom: 12rem;
}

.p-property-archive__layout {
    display: grid;
    grid-template-columns: 20rem minmax(0, 1fr);
    gap: 5rem;
    align-items: start;
}

.p-property-archive__sidebar {
    max-width: none;
    margin: 0;
}

.p-property-filter {
    --property-filter-pad-x: 1.5rem;
    --property-filter-section-pad-top: 0rem;
    --property-filter-section-pad-bottom: 2rem;
    --property-filter-choice-gap: 1.2rem;
    --property-filter-divider: #e4e7ec;
    --property-filter-blue: #162187;
    --property-filter-heading-bg: #f2f5fc;
    overflow: hidden;
    border: 1px solid #e5e8ee;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 0.2rem 0.8rem rgb(20 39 82 / 6%);
    font-family: "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    font-weight: 700;
}

.p-property-filter input,
.p-property-filter button,
.p-property-filter summary {
    font: inherit;
}

.p-property-filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2.4rem var(--property-filter-pad-x) 2.0rem;
}

.p-property-filter__header p {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 3.8rem;
    margin: 0;
    padding: 0 1rem;
    border-radius: 0.5rem;
    background: var(--property-filter-heading-bg);
    color: var(--property-filter-blue);
    font-size: 1.4rem;
    font-weight: 700;
    /* justify-content: center; */
}

.p-property-filter__heading-icon {
    /* width: 1.35rem; */
    /* height: auto; */
    margin-right: 0.9rem;
    /* object-fit: contain; */
}

.p-property-filter__close {
    display: none;
}

.p-property-filter__group {
    min-width: 0;
    margin: 0 var(--property-filter-pad-x) 2rem;
    padding: var(--property-filter-section-pad-top) 0 var(--property-filter-section-pad-bottom);
    border: 0;
    border-bottom: 1px dashed var(--property-filter-divider);
}

.p-property-filter__group legend {
    width: 100%;
    margin: 0 0 1rem;
    padding: 0;
    color: #1c29a7;
    font-size: 1.2rem;
    font-weight: 700;
}

.p-property-filter__choices {
    display: grid;
    gap: var(--property-filter-choice-gap);
}

.p-property-filter__choice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    /* Only the box and its text are clickable, not the empty space to the right. */
    width: fit-content;
    max-width: 100%;
    color: #000000;
    font-size: 1.2rem;
    line-height: 1.4;
    cursor: pointer;
}

.p-property-filter__transaction-panels {
    display: grid;
}

.p-property-filter__transaction-panel {
    grid-area: 1 / 1;
    align-self: start;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    transition: opacity 140ms ease, visibility 0s linear 140ms;
}

.p-property-filter__transaction-panel.is-active {
    pointer-events: auto;
    visibility: visible;
    opacity: 1;
    transition: opacity 140ms ease;
}

@media (prefers-reduced-motion: reduce) {
    .p-property-filter__transaction-panel {
        transition: none;
    }
}

.p-property-filter__choice input {
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    accent-color: #162187;
}

.p-property-filter__choice input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.p-property-filter__choice input[type="checkbox"]+span {
    position: relative;
    padding-left: 2.3rem;
}

.p-property-filter__choice input[type="checkbox"]+span::before {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    appearance: none;
    border: 1px solid #cbd2db;
    border-radius: 0.15rem;
    background: #fff;
    content: "";
    transform: translateY(-50%);
}

.p-property-filter__choice input[type="checkbox"]:checked+span::before {
    border-color: #162187;
    background: #162187;
}

.p-property-filter__choice input[type="checkbox"]:checked+span::after {
    position: absolute;
    top: 50%;
    left: 0.3rem;
    width: 0.9rem;
    height: 0.48rem;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: "";
    transform: translateY(-65%) rotate(-45deg);
}

.p-property-filter__choice input[type="checkbox"]:focus-visible+span::before {
    outline: 2px solid #7c9bd5;
    outline-offset: 2px;
}

.p-property-filter__choice input[type="radio"] {
    appearance: none;
    border: 1px solid #b7c1cc;
    border-radius: 50%;
    background: #fff;
}

/* The first group is the transaction selector. Keep its radio controls more prominent. */
.p-property-filter>.p-property-filter__group:first-of-type input[type="radio"] {
    width: 1.8rem;
    height: 1.8rem;
}

.p-property-filter>.p-property-filter__group:first-of-type .p-property-filter__choice+.p-property-filter__choice {
    margin-top: 1.5rem;
}

.p-property-filter__choice input[type="radio"]:checked {
    border: 0.35rem solid #fff;
    outline: 1px solid #162187;
    background: #162187;
}

.p-property-filter__area-list {
    display: grid;
    gap: var(--property-filter-choice-gap);
    margin: 0;
    padding: 0;
}

.p-property-filter__area-list--level-1 {
    margin-top: 0.7rem;
    margin-left: 0.55rem;
    padding-left: 1.35rem;
    border-left: 1px solid #edf0f4;
}

.p-property-filter__area-list--level-2 {
    margin-left: 0.55rem;
    padding-left: 1.1rem;
    border-left: 1px solid #edf0f4;
}

.p-property-filter__details {
    margin: 0 var(--property-filter-pad-x);
    border-bottom: 1px solid var(--property-filter-divider);
}

/* The boundaries around the optional conditions use solid rules, unlike regular filter groups. */
.p-property-filter__transaction-panels:has(+ .p-property-filter__details) .p-property-filter__group:last-child {
    border-bottom-style: solid;
}

.p-property-filter__details summary {
    position: relative;
    padding: var(--property-filter-section-pad-top) 0 var(--property-filter-section-pad-bottom);
    color: var(--property-filter-blue);
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.p-property-filter__details summary::-webkit-details-marker {
    display: none;
}

.p-property-filter__details summary::before,
.p-property-filter__details summary::after {
    position: absolute;
    top: 50%;
    left: 0;
    width: 1.1rem;
    border-top: 1px solid currentColor;
    content: "";
    transform: translateY(-50%);
}

.p-property-filter__details summary::after {
    transform: translateY(-50%) rotate(90deg);
}

.p-property-filter__details[open] summary::after {
    transform: translateY(-50%) rotate(0deg);
}

.p-property-filter__details summary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding-left: 0;
}

.p-property-filter__details summary::before {
    position: static;
    flex: 0 0 1.1rem;
    width: 1.1rem;
    border: 0;
    content: "+";
    font-size: 1.8rem;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    transform: translateY(-2px);
}

.p-property-filter__details summary::after {
    display: none;
}

.p-property-filter__details[open] summary::before {
    content: "−";
}

.p-property-filter__details .p-property-filter__group {
    margin-right: 0;
    margin-left: 0;
    border-bottom: 0;
}

.p-property-filter__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - (var(--property-filter-pad-x) * 2));
    min-height: 3.8rem;
    margin: 1.7rem var(--property-filter-pad-x);
    border: 0;
    border-radius: 999px;
    background: #cbb20d;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
}

.p-property-filter__submit-icon {
    margin-right: 0.7rem;
    object-fit: contain;
}

.p-property-archive__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.8rem;
}

.p-property-archive__header>div {
    display: flex;
    align-items: baseline;
    gap: 1.8rem;
}

/* Current search conditions (shown only when the list is filtered).
   PC: under the "絞り込み検索" heading in the filter box.
   Smartphone / tablet (the filter is a sheet): one line of text under the filter button. */
.p-property-filter__current {
    margin: -0.4rem var(--property-filter-pad-x) 2rem;
    padding-bottom: 1.8rem;
    border-bottom: 1px solid var(--property-filter-divider);
}

/* Same look as the other headings (種別・カテゴリ…). */
.p-property-filter__current-title {
    margin: 0 0 1rem;
    color: #1c29a7;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Each chosen condition in a thin, light capsule outline. */
.p-property-filter__current-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.p-property-filter__current-list li {
    padding: 0.3rem 0.9rem;
    border: 1px solid #d6dce5;
    border-radius: 999px;
    color: #000;
    font-size: 1.1rem;
    line-height: 1.4;
    white-space: nowrap;
    background-color: #fff;
}

.p-property-filter__current-clear {
    margin: 1.2rem 0 0;
    font-size: 1.1rem;
    text-align: right;
}

.p-property-filter__current-clear a {
    color: #162187;
    font-weight: 400;
    text-decoration: underline;
}

.p-property-archive__current-sp {
    display: none;
}

@media screen and (max-width: 1000px) {
    .p-property-filter__current {
        display: none;
    }

    .p-property-archive__current-sp {
        display: block;
        margin: -1.2rem 0 3rem;
        padding: 1.4rem 1.6rem 1.2rem;
        border: 1px solid #e5e8ee;
        border-radius: 0.8rem;
        background: #f7f7f7;
    }
}

/* Tablet: the conditions and "すべてクリア" on one row (smartphones keep them on separate rows). */
@media screen and (min-width: 481px) and (max-width: 1000px) {
    .p-property-archive__current-sp {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 1.6rem;
    }

    .p-property-archive__current-sp .p-property-filter__current-title {
        flex: 0 0 100%;
        margin: 0 0 1rem;
        color: #1c29a7;
        font-size: 1.5rem;
        font-weight: 700;
    }

    .p-property-archive__current-sp .p-property-filter__current-list {
        flex: 1 1 0;
        min-width: 0;
    }

    .p-property-archive__current-sp .p-property-filter__current-clear {
        flex: 0 0 auto;
        margin: 0;
    }
}


.p-property-archive__title {
    margin: 0;
    color: #162187;
    font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
    font-size: clamp(2.5rem, 3vw, 3.5rem);
    font-weight: 400;
}

.p-property-archive__count {
    margin: 0;
    color: #475364;
    font-size: 1.6rem;
}

.p-property-archive__count strong {
    position: relative;
    top: 0.3rem;
    margin: 0 0.2rem;
    color: #162187;
    font-size: 2.8rem;
}

.p-property-archive__controls {
    display: flex;
    gap: 2.4rem;
}

.p-property-archive__controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000;
    font-size: 1.2rem;
    white-space: nowrap;
    font-weight: 600;
}

.p-property-archive__controls select {
    min-height: 3rem;
    padding: 0.35rem 1.5rem 0.35rem 0.8rem;
    border: 1px solid #d5dce5;
    border-radius: 0.3rem;
    background-color: #fff;
    color: #000000;
    font-size: 1.2rem;
    font-weight: 500;
}

.p-property-archive__select-wrap {
    position: relative;
    display: inline-flex;
}

.p-property-archive__select-wrap select {
    appearance: none;
    padding-right: 2.8rem;
}

.p-property-archive__select-wrap::after {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    width: 0.65rem;
    height: 0.65rem;
    border-right: 2px solid #162187;
    border-bottom: 2px solid #162187;
    content: "";
    pointer-events: none;
    transform: translateY(-70%) rotate(45deg);
}

.p-property-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3rem 2rem;
}

.p-property-archive .p-property-card {
    overflow: hidden;
    border: 1px solid #e1e6ec;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 0.2rem 0.9rem rgb(21 38 76 / 5%);
    transition: box-shadow 160ms ease, transform 160ms ease;
}

.p-property-archive .p-property-card:has(.p-property-card__link:focus-visible) {
    box-shadow: 0 0.8rem 2rem rgb(21 38 76 / 14%);
    transform: translateY(-0.3rem);
}

button.p-property-filter__submit {
    font-size: 1.4rem;
}

@media (hover: hover) {
    .p-property-archive .p-property-card:has(.p-property-card__link:hover) {
        box-shadow: 0 0.8rem 2rem rgb(21 38 76 / 14%);
        transform: translateY(-0.3rem);
    }
}

.p-property-archive .p-property-card__image-wrap {
    /* aspect-ratio: 460 / 354; */
    background: #edf1f5;
}

.p-property-archive .p-property-card__badge {
    top: 1.4rem;
    left: 1.4rem;
    padding: 3.5px 11px;
    border-radius: 5px;
    background: #162187;
    color: #fff;
    font-size: 1.2rem;
}

.p-property-archive .p-property-card__favorite-button {
    top: 0.9rem;
    right: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    flex: 0 0 3.5rem;
    min-height: 0;
    box-sizing: border-box;
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 94%);
    box-shadow: 0 0.1rem 0.5rem rgb(19 34 66 / 16%);
    color: #5266bb;
    z-index: 2;
    display: grid;
    place-items: center;
    padding: 0;
    line-height: 1;
    cursor: pointer;
}

.p-property-archive .p-property-card__favorite-button.is-favorite {
    color: #ddc31b;
}

.p-property-archive .c-favorite-button__icon {
    display: grid;
    width: 1.8rem;
    height: 1.8rem;
    margin: 0;
    font-size: 1.8rem;
    line-height: 1;
    place-items: center;
}

.p-property-archive .c-favorite-button__image {
    display: block;
    /* Shown at the image's own size (18 x 16); the icon box centers it.
       If the box is smaller (smartphone), the icon shrinks to fit instead of sticking out. */
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
}

.p-property-archive .p-property-card__body {
    padding: 1.3rem 1.2rem 0.9rem;
}

.p-property-archive .p-property-card__title {
    overflow: hidden;
    min-height: 0;
    margin: 0;
    color: #162187;
    font-size: 1.6rem;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-property-archive .p-property-card__summary {
    min-height: 0rem;
    margin-top: -2px;
    color: #697381;
    font-size: 1rem;
}

.p-property-archive .p-property-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin: 0 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid #edf0f3;
    color: #162187;
}

.p-property-archive .p-property-card__price strong {
    font-size: 2.2rem;
    line-height: 1;
}

.p-property-archive .p-property-card__price span {
    color: #162187;
    font-size: 1.2rem;
    font-weight: bold;
}

.p-property-archive .p-property-card__price small {
    color: #79818d;
    font-size: 1.2rem;
}

.p-property-archive .p-property-card__address {
    display: flex;
    align-items: flex-start;
    min-height: 3.3rem;
    margin: 0.8rem 0 0;
    padding: 1.5rem 0 0;
    border-top: 1px solid #edf0f3;
    color: #7a838f;
    font-size: 1rem;
    line-height: 1.45;
}

.p-property-archive .p-property-card__location-icon {
    flex: 0 0 auto;
    /* width: 1rem; */
    /* height: auto; */
    margin: 0.1rem 0.45rem 1px 0.3rem;
    object-fit: contain;
}

.p-property-archive .p-property-card__footer {
    padding: 0 1.5rem 2.5rem;
}

.p-property-archive .p-property-card__detail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    border-radius: 999px;
    background: #e7eef7;
    color: #000000;
    font-size: 1.2rem;
    transition: background-color 160ms ease, color 160ms ease;
}

.p-property-archive .p-property-card__link:focus-visible .p-property-card__detail-button {
    background: #d8e4f1;
    color: #162187;
}

@media (hover: hover) {
    .p-property-archive .p-property-card__link:hover .p-property-card__detail-button {
        background: #d8e4f1;
        color: #162187;
    }
}

.p-property-archive .p-property-card__detail-button i {
    position: relative;
    width: 1.2rem;
    height: 0.8rem;
    margin-left: 0.7rem;
}

.p-property-archive .p-property-card__detail-button i::before,
.p-property-archive .p-property-card__detail-button i::after {
    position: absolute;
    top: 50%;
    border-top: 1px solid currentColor;
    content: "";
}

.p-property-archive .p-property-card__detail-button i::before {
    left: 0;
    width: 1.2rem;
}

.p-property-archive .p-property-card__detail-button i::after {
    right: 0;
    width: 0.6rem;
    transform: rotate(45deg);
    transform-origin: right center;
}

.p-property-archive__empty {
    margin: 0;
    padding: 5rem 2rem;
    border: 1px solid #e1e6ec;
    color: #66707d;
    text-align: center;
}

.p-property-archive__pagination {
    display: flex;
    justify-content: center;
    margin-top: 9.5rem;
}

.p-property-archive__pagination-frame {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    margin: 0;
    padding: 0;
    border: 1px solid #dce2e9;
    border-radius: 999px;
}

.p-property-archive__pagination-previous,
.p-property-archive__pagination-next,
.p-property-archive__pagination-pages {
    display: flex;
    align-items: center;
}

.p-property-archive__pagination-previous,
.p-property-archive__pagination-next {
    min-width: 8rem;
}

.p-property-archive__pagination-previous {
    border-right: 1px solid #cfd4dd;
}

.p-property-archive__pagination-next {
    border-left: 1px solid #cfd4dd;
}

.p-property-archive__pagination-pages {
    gap: 2rem;
    padding: 0 1.5rem;
}

.p-property-archive__pagination-previous a,
.p-property-archive__pagination-previous .is-disabled,
.p-property-archive__pagination-next a,
.p-property-archive__pagination-next .is-disabled {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 3.9rem;
    padding: 0;
    border: 0;
    color: #162187;
    font-size: 1.4rem;
}

.p-property-archive__pagination-previous a {
    padding-left: 1.8rem;
}

.p-property-archive__pagination-next a {
    padding-right: 1.8rem;
}

.p-property-archive__pagination-previous a::before,
.p-property-archive__pagination-next a::after {
    position: absolute;
    top: 50%;
    width: 0.65rem;
    height: 0.65rem;
    border: solid currentColor;
    border-width: 0 1px 1px 0;
    content: "";
}

.p-property-archive__pagination-previous a::before {
    left: 1.4rem;
    transform: translateY(-50%) rotate(135deg);
}

.p-property-archive__pagination-next a::after {
    right: 2.2rem;
    transform: translateY(-50%) rotate(-45deg);
}

.p-property-archive__pagination .is-disabled {
    color: #a5acb8;
}

.p-property-archive__pagination-pages a,
.p-property-archive__pagination-pages span {
    display: inline-grid;
    min-width: 2.6rem;
    min-height: 2.6rem;
    padding: 0;
    border: 0;
    place-items: center;
    color: #162187;
    font-size: 1.6rem;
    font-weight: 700;
}

.p-property-archive__pagination-pages .current {
    min-width: 2.5rem;
    min-height: 2.5rem;
    border-radius: 50%;
    background: #162187;
    color: #fff;
}

.p-property-archive__filter-toggle,
.p-property-archive__filter-overlay {
    display: none;
}

@media screen and (max-width: 1000px) {
    .p-property-archive__content {
        padding-top: 12rem;
        padding-bottom: 12rem;
    }

    .p-property-archive__layout {
        display: block;
    }

    .p-property-archive__filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 15rem;
        min-height: 4.2rem;
        margin: 0 0 3rem auto;
        border: 1px solid #162187;
        border-radius: 999px;
        background: #fff;
        color: #162187;
        font-size: 1.2rem;
        font-weight: 700;
    }

    .p-property-archive__filter-toggle::before {
        width: 1.7rem;
        height: 1.6rem;
        margin-right: 0.7rem;
        background-color: currentColor;
        -webkit-mask: url("../img/property/property-filter-submit-icon@2x.png") center / contain no-repeat;
        mask: url("../img/property/property-filter-submit-icon@2x.png") center / contain no-repeat;
        content: "";
    }

    /* The filter panel itself (a bottom sheet) is styled in the "Filter as a bottom sheet" block at the end of this file. */

    .p-property-archive__filter-overlay {
        position: fixed;
        z-index: 1001;
        inset: 0;
        background: rgb(10 22 48 / 42%);
    }

    .p-property-archive__filter-overlay.is-open {
        display: block;
    }

    .p-property-filter__close {
        position: relative;
        display: block;
        width: 2.4rem;
        height: 2.4rem;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .p-property-filter__close::before,
    .p-property-filter__close::after {
        position: absolute;
        top: 50%;
        left: 0.3rem;
        width: 1.8rem;
        border-top: 1px solid #162187;
        content: "";
        transform: rotate(45deg);
    }

    .p-property-filter__close::after {
        transform: rotate(-45deg);
    }

    .p-property-archive__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media screen and (max-width: 768px) {
    .p-property-archive__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .p-property-archive__controls {
        width: 100%;
        justify-content: flex-end;
    }

    .p-property-archive__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .c-favorite-button {
        margin-top: 0px;
    }
}

@media screen and (max-width: 480px) {
    .p-property-archive__content {
        padding-top: 10rem;
        padding-bottom: 10rem;
    }

    .p-property-archive__filter-toggle {
        width: 100%;
        margin-bottom: 2.4rem;
    }

    .p-property-archive__header>div {
        display: block;
    }

    .p-property-archive__count {
        margin-top: 0.7rem;
    }

    .p-property-archive__controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .p-property-archive__controls label {
        display: grid;
        gap: 0.4rem;
    }

    .p-property-archive__controls select {
        width: 100%;
    }

    .p-property-archive__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .p-property-archive .p-property-card__title {
        font-size: 1.5rem;
    }

    .p-property-archive .p-property-card__price strong {
        font-size: 2.3rem;
    }

    .p-property-archive__pagination {
        margin-top: 4rem;
    }

    .p-property-archive__pagination-previous,
    .p-property-archive__pagination-next {
        min-width: 6.2rem;
    }

    .p-property-archive__pagination-previous a,
    .p-property-archive__pagination-previous .is-disabled,
    .p-property-archive__pagination-next a,
    .p-property-archive__pagination-next .is-disabled {
        min-height: 3.8rem;
        font-size: 1.1rem;
    }

    .p-property-archive__pagination-previous a::before {
        left: 0.8rem;
    }

    .p-property-archive__pagination-next a::after {
        right: 0.8rem;
    }

    .p-property-archive__pagination-pages {
        gap: 0;
        padding: 0.4rem;
    }

    .p-property-archive__pagination-pages a,
    .p-property-archive__pagination-pages span {
        min-width: 2.8rem;
        min-height: 2.8rem;
        font-size: 1.2rem;
    }



}

/*-------------------------------------------
Filter as a bottom sheet (1000px and below)
The sidebar form slides up from the bottom and fills the screen: a fixed header (close / title / clear),
large tap-friendly choice buttons, and a fixed search button with the number of matching properties.
-------------------------------------------*/
.p-property-filter__clear,
.p-property-filter__submit-count {
    display: none;
}

@media screen and (max-width: 1000px) {

    html.is-property-filter-open,
    html.is-property-filter-open body {
        overflow: hidden;
    }

    .p-property-archive__sidebar {
        position: fixed;
        top: 4rem;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1002;
        width: min(100%, 64rem);
        margin: 0 auto;
        padding: 0;
        overflow: hidden;
        border-radius: 1.6rem 1.6rem 0 0;
        background: #fff;
        box-shadow: 0 -0.4rem 2.4rem rgb(14 29 62 / 18%);
        transform: translateY(105%);
        visibility: hidden;
        transition: none;
    }

    .p-property-archive__sidebar.is-open {
        transform: translateY(0);
        visibility: visible;
    }

    .p-property-archive__sidebar.is-animating {
        transition: transform 0.3s ease, visibility 0.3s;
    }

    .p-property-archive__sidebar .p-property-filter {
        --property-filter-pad-x: 2rem;
        height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        /* Keeps a focused choice clear of the fixed header and search button. */
        scroll-padding: 7rem 0 9rem;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Header: close (left) / title (center) / clear (right), fixed while the sheet scrolls. */
    .p-property-archive__sidebar .p-property-filter__header {
        position: sticky;
        top: 0;
        z-index: 2;
        display: grid;
        grid-template-columns: 4.4rem minmax(0, 1fr) 4.4rem;
        align-items: center;
        padding: 0.8rem 1.2rem;
        border-bottom: 1px solid #e4e7ec;
        background: #fff;
    }

    .p-property-archive__sidebar .p-property-filter__header p {
        grid-column: 2;
        grid-row: 1;
        justify-content: center;
        min-height: 4.4rem;
        padding: 0;
        background: transparent;
        font-size: 1.6rem;
    }

    .p-property-archive__sidebar .p-property-filter__close {
        grid-column: 1;
        grid-row: 1;
        width: 4.4rem;
        height: 4.4rem;
    }

    .p-property-archive__sidebar .p-property-filter__close::before,
    .p-property-archive__sidebar .p-property-filter__close::after {
        left: 1.3rem;
    }

    .p-property-archive__sidebar .p-property-filter__clear {
        grid-column: 3;
        grid-row: 1;
        display: block;
        min-height: 4.4rem;
        padding: 0;
        border: 0;
        background: transparent;
        color: #162187;
        font-size: 1.3rem;
        text-decoration: underline;
        cursor: pointer;
    }

    .p-property-archive__sidebar .p-property-filter__group {
        margin: 0 var(--property-filter-pad-x);
        padding: 2rem 0;
        border-bottom: 1px solid #eef0f4;
    }

    /* Headings (種別・カテゴリ・エリア…) are larger than the choices and marked with a navy bar, so they stand apart. */
    .p-property-archive__sidebar .p-property-filter__group legend {
        float: left;
        width: 100%;
        margin-bottom: 1.4rem;
        padding-left: 1rem;
        border-left: 0.4rem solid #162187;
        color: #162187;
        font-size: 1.6rem;
        font-weight: 700;
        line-height: 1.3;
    }

    /* More room between the fixed header and the first heading (種別). */
    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type {
        padding-top: 2.8rem;
    }

    .p-property-archive__sidebar .p-property-filter__group legend+* {
        clear: both;
    }

    /* Rental / sale: a two-part switch at the top. The two buttons are floated side by side
       (not a grid: Safari then puts the heading on the frame and the top space under it). */
    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type {
        display: flow-root;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type .p-property-filter__choice {
        float: left;
        width: 50%;
        margin: 0;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type .p-property-filter__choice+.p-property-filter__choice {
        margin-top: 0;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type input[type="radio"] {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type span {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        min-height: 4.4rem;
        border: 1px solid #162187;
        background: #fff;
        color: #162187;
        font-size: 1.5rem;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type .p-property-filter__choice:first-of-type span {
        border-radius: 0.8rem 0 0 0.8rem;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type .p-property-filter__choice:last-of-type span {
        border-left: 0;
        border-radius: 0 0.8rem 0.8rem 0;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type input:checked+span {
        background: #162187;
        color: #fff;
    }

    .p-property-archive__sidebar .p-property-filter>.p-property-filter__group:first-of-type input:focus-visible+span {
        outline: 2px solid #7c9bd5;
        outline-offset: 2px;
    }

    /* Every other choice is a large button; a chosen one is filled in navy. */
    .p-property-archive__sidebar .p-property-filter__choices,
    .p-property-archive__sidebar .p-property-filter__area-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
        gap: 0.8rem;
    }

    .p-property-archive__sidebar .p-property-filter__area-list li:has(> .p-property-filter__area-list) {
        grid-column: 1 / -1;
    }

    .p-property-archive__sidebar .p-property-filter__area-list--level-1,
    .p-property-archive__sidebar .p-property-filter__area-list--level-2 {
        margin: 0.8rem 0 0;
        padding: 0;
        border-left: 0;
    }

    /* The hidden checkbox / radio stays inside its own button. Otherwise tapping a button focuses an input
       placed elsewhere in the sheet, and the sheet jumps to it. */
    .p-property-archive__sidebar .p-property-filter__choice {
        position: relative;
    }

    .p-property-archive__sidebar .p-property-filter__choice input {
        top: 0;
        left: 0;
    }

    .p-property-archive__sidebar .p-property-filter__choices .p-property-filter__choice,
    .p-property-archive__sidebar .p-property-filter__area-list .p-property-filter__choice {
        display: flex;
        width: 100%;
    }

    /* Buttons in a row share the height of the tallest one; an area with sub-areas keeps its own height. */
    .p-property-archive__sidebar .p-property-filter__choices .p-property-filter__choice {
        height: 100%;
    }

    .p-property-archive__sidebar .p-property-filter__area-list li {
        display: flex;
        flex-direction: column;
    }

    .p-property-archive__sidebar .p-property-filter__area-list li>.p-property-filter__choice {
        flex: 1 0 auto;
    }

    .p-property-archive__sidebar .p-property-filter__area-list li:has(> .p-property-filter__area-list)>.p-property-filter__choice {
        flex: 0 0 auto;
    }

    .p-property-archive__sidebar .p-property-filter__choices input[type="checkbox"]+span,
    .p-property-archive__sidebar .p-property-filter__area-list input[type="checkbox"]+span {
        display: flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        min-height: 4.4rem;
        padding: 0.6rem 0.8rem;
        border: 1px solid #cfd6e0;
        border-radius: 0.8rem;
        background: #fff;
        color: #222;
        font-size: 1.3rem;
        line-height: 1.3;
        text-align: center;
    }

    .p-property-archive__sidebar .p-property-filter__choices input[type="checkbox"]+span::before,
    .p-property-archive__sidebar .p-property-filter__choices input[type="checkbox"]+span::after,
    .p-property-archive__sidebar .p-property-filter__area-list input[type="checkbox"]+span::before,
    .p-property-archive__sidebar .p-property-filter__area-list input[type="checkbox"]+span::after {
        display: none;
    }

    .p-property-archive__sidebar .p-property-filter__choices input[type="checkbox"]:checked+span,
    .p-property-archive__sidebar .p-property-filter__area-list input[type="checkbox"]:checked+span {
        border-color: #162187;
        background: #162187;
        color: #fff;
    }

    .p-property-archive__sidebar .p-property-filter__choices input[type="checkbox"]:focus-visible+span,
    .p-property-archive__sidebar .p-property-filter__area-list input[type="checkbox"]:focus-visible+span {
        outline: 2px solid #7c9bd5;
        outline-offset: 2px;
    }

    .p-property-archive__sidebar .p-property-filter__details {
        margin: 0 var(--property-filter-pad-x);
        border-bottom: 0;
    }

    /* "詳細条件を表示" is not used on the sheet: the conditions are always shown (main.js opens it). */
    .p-property-archive__sidebar .p-property-filter__details summary {
        display: none;
    }

    .p-property-archive__sidebar .p-property-filter__details .p-property-filter__group {
        margin: 0;
        padding-top: 2rem;
        border-bottom: 0;
    }

    /* Footer: the search button with the count stays at the bottom. */
    .p-property-archive__sidebar .p-property-filter__footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        padding: 1.2rem var(--property-filter-pad-x) calc(1.2rem + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #e4e7ec;
        background: #fff;
    }

    .p-property-archive__sidebar .p-property-filter .p-property-filter__submit {
        width: 100%;
        min-height: 4.8rem;
        margin: 0;
        font-size: 1.5rem;
    }

    .p-property-archive__sidebar .p-property-filter__submit-label {
        display: none;
    }

    .p-property-archive__sidebar .p-property-filter__submit-count {
        display: inline;
    }

    .p-property-archive__sidebar .p-property-filter__submit-count strong {
        margin: 0 0.2rem 0 0.4rem;
        font-size: 1.9rem;
    }
}

@media screen and (max-width: 1000px) and (prefers-reduced-motion: reduce) {
    .p-property-archive__sidebar.is-animating {
        transition: none;
    }
}

/* Price slider (smartphone / tablet sheet only; PC keeps the preset range checkboxes) */
.p-property-filter__price-slider {
    display: none;
}

@media screen and (max-width: 1000px) {
    .p-property-archive__sidebar .p-property-filter__group--price .p-property-filter__choices {
        display: none;
    }

    .p-property-archive__sidebar .p-property-filter__price-slider {
        display: block;
        clear: both;
    }

    .p-property-filter__price-value {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 0.8rem;
        margin: 0 0 1.2rem;
        color: #162187;
        font-size: 1.8rem;
        font-weight: 700;
    }

    .p-property-filter__price-track {
        --price-low: 0%;
        --price-high: 100%;
        position: relative;
        height: 3.2rem;
        margin: 0 1.3rem;
    }

    /* Grey rail and the navy part between the two handles */
    .p-property-filter__price-track::before,
    .p-property-filter__price-track::after {
        position: absolute;
        top: 50%;
        height: 0.4rem;
        margin-top: -0.2rem;
        border-radius: 999px;
        content: "";
    }

    .p-property-filter__price-track::before {
        right: 0;
        left: 0;
        background: #dfe4ec;
    }

    .p-property-filter__price-track::after {
        right: calc(100% - var(--price-high));
        left: var(--price-low);
        background: #162187;
    }

    .p-property-filter__price-track input[type="range"] {
        position: absolute;
        z-index: 1;
        top: 0;
        left: -1.3rem;
        width: calc(100% + 2.6rem);
        height: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
        pointer-events: none;
        -webkit-appearance: none;
        appearance: none;
    }

    .p-property-filter__price-track input[type="range"].is-front {
        z-index: 2;
    }

    .p-property-filter__price-track input[type="range"]::-webkit-slider-runnable-track {
        height: 100%;
        background: transparent;
    }

    .p-property-filter__price-track input[type="range"]::-moz-range-track {
        background: transparent;
    }

    .p-property-filter__price-track input[type="range"]::-webkit-slider-thumb {
        width: 2.6rem;
        height: 2.6rem;
        margin-top: 0.3rem;
        border: 2px solid #162187;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0.2rem 0.6rem rgb(20 39 82 / 20%);
        cursor: pointer;
        pointer-events: auto;
        -webkit-appearance: none;
        appearance: none;
    }

    .p-property-filter__price-track input[type="range"]::-moz-range-thumb {
        width: 2.2rem;
        height: 2.2rem;
        border: 2px solid #162187;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0.2rem 0.6rem rgb(20 39 82 / 20%);
        cursor: pointer;
        pointer-events: auto;
    }

    .p-property-filter__price-track input[type="range"]:focus-visible::-webkit-slider-thumb {
        outline: 2px solid #7c9bd5;
        outline-offset: 2px;
    }

    .p-property-filter__price-steppers {
        display: flex;
        justify-content: space-between;
        gap: 1.6rem;
        margin-top: 1.2rem;
    }

    .p-property-filter__price-steppers div {
        display: flex;
        align-items: center;
        gap: 0.8rem;
        color: #475364;
        font-size: 1.2rem;
    }

    .p-property-filter__price-steppers button {
        width: 3.6rem;
        height: 3.6rem;
        padding: 0;
        border: 1px solid #cfd6e0;
        border-radius: 50%;
        background: #fff;
        color: #162187;
        font-size: 1.8rem;
        line-height: 1;
        cursor: pointer;
    }
}

/*-------------------------------------------
Filter sheet heading icons (1000px and below)
Line icons in front of each heading instead of the navy bar.
To go back to the bar, delete this whole block.
-------------------------------------------*/
@media screen and (max-width: 1000px) {
    .p-property-archive__sidebar .p-property-filter__group legend {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding-left: 0;
        border-left: 0;
    }

    .p-property-archive__sidebar .p-property-filter__group legend::before {
        flex: 0 0 2.2rem;
        width: 2.2rem;
        height: 2.2rem;
        background: center / contain no-repeat;
        content: "";
        /* The text's visual center sits about 1px above the line box center, so the icon is raised to match. */
        transform: translateY(-0.12rem);
    }

    .p-property-archive__sidebar .p-property-filter__group--transaction legend::before {
        background-image: url("../img/property/filter-icons/transaction.svg");
    }

    .p-property-archive__sidebar .p-property-filter__group--type legend::before {
        background-image: url("../img/property/filter-icons/type.svg");
    }

    .p-property-archive__sidebar .p-property-filter__group--area legend::before {
        background-image: url("../img/property/filter-icons/area.svg");
    }

    .p-property-archive__sidebar .p-property-filter__group--price legend::before {
        background-image: url("../img/property/filter-icons/price.svg");
    }

    .p-property-archive__sidebar .p-property-filter__group--floor-plan legend::before {
        background-image: url("../img/property/filter-icons/floor-plan.svg");
    }

    .p-property-archive__sidebar .p-property-filter__group--condition legend::before {
        background-image: url("../img/property/filter-icons/condition.svg");
    }
}