.rms-page {
    min-height: calc(100vh - 72px);
    background: #f5f5f5;
}

.rms-toolbar {
    position: sticky;
    top: 72px;
    z-index: 35;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e5e7eb;
    backdrop-filter: blur(8px);
}

.rms-toolbar-inner {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 0.9fr) auto 1.8fr;
    gap: 0.6rem;
    align-items: center;
    width: min(1880px, calc(100% - 1.2rem));
    margin: 0 auto;
    padding: 0.55rem 0;
}

.rms-field {
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #111827;
    padding: 0 0.75rem;
    font-size: 0.92rem;
}

.rms-search {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.rms-search input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: 0.92rem;
}

.rms-date {
    text-align: left;
    cursor: pointer;
}

.rms-submit {
    height: 40px;
    min-width: 58px;
    border: 0;
    border-radius: 8px;
    font-weight: 700;
    color: #fff;
    background: #111827;
    cursor: pointer;
}

.rms-filter-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.rms-chip {
    height: 36px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    padding: 0 0.85rem;
    white-space: nowrap;
    font-size: 0.86rem;
    cursor: pointer;
}

.rms-chip:hover {
    border-color: #111827;
}

.rms-reset {
    color: #111827;
    font-weight: 700;
}

.rms-shell {
    display: grid;
    grid-template-columns: minmax(420px, 560px) minmax(0, 1fr);
    height: calc(100vh - 72px - 53px);
}

.rms-list-panel {
    background: #f0f0f0;
    border-right: 1px solid #d1d5db;
    overflow: auto;
}

.rms-list-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.7rem;
}

.rms-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.rms-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.12);
}

.rms-card.active {
    box-shadow: 0 0 0 2px #7c3aed inset;
}

.rms-card.rms-card-hidden {
    display: none;
}

.rms-card-link {
    display: block;
}

.rms-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

.rms-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.rms-badge {
    position: absolute;
    left: 0.45rem;
    top: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #4c1d95;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 7px;
    padding: 0.2rem 0.45rem;
}

.rms-like {
    position: absolute;
    right: 0.45rem;
    top: 0.45rem;
    border: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.62);
    color: #fff;
    cursor: pointer;
}

.rms-body {
    padding: 0.58rem 0.58rem 0.64rem;
}

.rms-body h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.25;
    letter-spacing: -0.01em;
    color: #111827;
}

.rms-sub {
    margin: 0.3rem 0 0;
    color: #374151;
    font-size: 0.91rem;
}

.rms-meta {
    margin: 0.2rem 0 0;
    color: #4b5563;
    font-size: 0.86rem;
}

.rms-price {
    margin: 0.48rem 0 0;
    color: #111827;
    font-size: 1.02rem;
    font-weight: 800;
}

.rms-price span {
    color: #7c3aed;
    font-weight: 700;
}

.rms-fee {
    margin: 0.22rem 0 0;
    color: #4b5563;
    font-size: 0.85rem;
}

.rms-tags {
    margin-top: 0.45rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.rms-tags span {
    display: inline-block;
    border-radius: 7px;
    background: #f3f4f6;
    color: #374151;
    padding: 0.16rem 0.42rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.rms-empty {
    grid-column: 1 / -1;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    padding: 2rem;
    text-align: center;
}

.rms-empty h2 {
    margin: 0;
    color: #111827;
    font-size: 1.3rem;
}

.rms-empty p {
    margin: 0.4rem 0 0;
    color: #4b5563;
}

.rms-viewport-empty {
    grid-column: 1 / -1;
    display: none;
    background: #fff;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    padding: 1.1rem;
    text-align: center;
    color: #4b5563;
    font-size: 0.9rem;
}

.rms-viewport-empty.is-visible {
    display: block;
}

.rms-map-panel {
    position: relative;
    background: #d9d9d9;
}

.rms-map-header {
    position: absolute;
    left: 0.7rem;
    top: 0.7rem;
    z-index: 5;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e5e7eb;
    padding: 0.45rem 0.65rem;
    font-size: 0.82rem;
    color: #111827;
}

.rms-map-canvas,
.rms-map-fallback {
    width: 100%;
    height: 100%;
}

.rms-map-fallback {
    display: none;
    background: #eef2ff;
    align-items: center;
    justify-content: center;
}

.rms-map-fallback-card {
    width: min(420px, calc(100% - 2rem));
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    background: #fff;
    padding: 1.1rem 1rem;
    text-align: center;
    color: #1e293b;
}

.rms-map-fallback-card strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.rms-map-fallback-card p {
    margin: 0;
    color: #475569;
    font-size: 0.9rem;
}

.rms-map-bubble {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    user-select: none;
}

.rms-map-bubble.active {
    background: #7c3aed;
}

.rms-map-cluster {
    background: radial-gradient(circle at 30% 25%, #303030 0%, #111827 65%);
    border-color: rgba(255, 255, 255, 0.9);
}

/* ---- 내 위치 버튼 ---- */
.rms-locate-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    height: 26px;
    padding: 0 0.55rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rms-locate-btn:hover {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.rms-locate-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ---- 현재 위치 마커 ---- */
.rms-user-marker {
    position: relative;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rms-user-marker-dot {
    width: 14px;
    height: 14px;
    background: #2563eb;
    border-radius: 999px;
    border: 2.5px solid #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.55);
    position: relative;
    z-index: 1;
}

.rms-user-marker-pulse {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.22);
    animation: rmsUserPulse 2s ease-out infinite;
}

@keyframes rmsUserPulse {
    0% { transform: scale(0.65); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* ---- 위치 안내 토스트 ---- */
.rms-geo-toast {
    position: absolute;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 20;
    background: rgba(17, 24, 39, 0.9);
    color: #fff;
    padding: 0.5rem 1.1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    pointer-events: none;
}

.rms-geo-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rms-geo-toast.rms-geo-toast--success {
    background: rgba(22, 163, 74, 0.93);
}

.rms-geo-toast.rms-geo-toast--error {
    background: rgba(220, 38, 38, 0.93);
}

@media (max-width: 1180px) {
    .rms-toolbar-inner {
        grid-template-columns: 1fr 1fr auto;
    }

    .rms-filter-row {
        grid-column: 1 / -1;
    }

    .rms-shell {
        grid-template-columns: 1fr;
        height: auto;
    }

    .rms-map-panel {
        min-height: 58vh;
        order: -1;
    }

    .rms-list-panel {
        height: auto;
    }
}

@media (max-width: 760px) {
    .rms-toolbar {
        top: 0;
    }

    .rms-toolbar-inner {
        grid-template-columns: 1fr;
        gap: 0.45rem;
        padding: 0.55rem 0;
    }

    .rms-submit {
        width: 100%;
    }

    .rms-list-grid {
        grid-template-columns: 1fr;
    }

    .rms-map-panel {
        min-height: 48vh;
    }
}
