/* 方案 E 房型网格+弹窗：仅在 body.rm-e-on 时生效，不影响默认旧布局 */

body.rm-e-on #rooms .desk-only > .split-show,
body.rm-e-on #dining .desk-only > .split-show,
body.rm-e-on #facility .desk-only > .split-show {
  display: none !important;
}

/* 页面底部固定「收藏 / PK / 咨询」栏会挡住最后一排卡片 */
body.rm-e-on #facility {
  padding-bottom: 108px;
}

.rm-e {
  margin: 0;
}

.rm-e-lead {
  font-size: 12px;
  color: var(--muted, #5e6b66);
  letter-spacing: .04em;
  margin: 0 0 10px;
  line-height: 1.3;
}

.rm-e-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rm-e-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line, #e4d9c8);
  border-radius: 12px;
  min-height: 92px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.rm-e-card:hover,
.rm-e-card:focus-visible {
  border-color: #c8d9b0;
  box-shadow: 0 4px 14px rgba(28, 43, 38, .07);
  outline: none;
}

.rm-e-thumb {
  width: 112px;
  height: 76px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef3eb;
  flex: 0 0 auto;
}

.rm-e-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.rm-e-thumb.is-empty {
  display: block;
}

.rm-e-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1px 0;
}

.rm-e-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ink, #1c2b26);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rm-e-en {
  font-size: 11px;
  color: var(--muted, #5e6b66);
  font-weight: 450;
  line-height: 1.3;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-e-specs {
  font-size: 11px;
  color: var(--green-dark, #4E763E);
  font-weight: 600;
  margin-top: 5px;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rm-e-go {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  flex: 0 0 auto;
  color: var(--green-dark, #4E763E);
  font-size: 12px;
  font-weight: 650;
  padding-right: 4px;
  letter-spacing: .04em;
}

.rm-e-go svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-e-empty {
  color: var(--muted, #5e6b66);
  font-size: 14px;
  margin: 8px 0 0;
}

.rm-e-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: rgba(28, 43, 38, .58);
}

.rm-e-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(1120px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 48px));
  z-index: 4010;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 56px rgba(28, 43, 38, .28);
  display: grid;
  grid-template-columns: minmax(0, 680px) minmax(280px, 1fr);
}

.rm-e-photo {
  position: relative;
  background: #eef3eb;
  height: 100%;
  min-width: 0;
}

.rm-e-photo .img-grid,
.rm-e-photo .ph {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  gap: 0;
  grid-template-columns: none;
  overflow: hidden;
  background: #eef3eb;
  border-radius: 0;
}

.rm-e-photo .img-grid > img.photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  border: 0;
}

.rm-e-photo .img-grid > img.photo.is-cur {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.rm-e-arr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  color: var(--green-dark, #4E763E);
  border: 1px solid #d5e4c4;
  box-shadow: 0 2px 10px rgba(28, 43, 38, .12);
  display: grid;
  place-items: center;
  z-index: 2;
  cursor: pointer;
  padding: 0;
}

.rm-e-arr svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-e-arr.prev { left: 12px; }
.rm-e-arr.next { right: 12px; }
.rm-e-arr[disabled] { opacity: 0; pointer-events: none; }

.rm-e-count {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  background: rgba(28, 43, 38, .62);
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .06em;
  pointer-events: none;
}

.rm-e-all {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(28, 43, 38, .72);
  color: #fff;
  border-radius: 999px;
  border: 0;
  padding: 5px 10px 5px 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .04em;
  cursor: pointer;
}

.rm-e-all svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-e-thumbs {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 6px;
}

.rm-e-thumb-btn {
  width: 56px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  background: #eef3eb;
  cursor: pointer;
}

.rm-e-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

.rm-e-thumb-btn.on {
  border-color: #fff;
  box-shadow: 0 0 0 1px var(--green-dark, #4E763E);
}

.rm-e-side {
  position: relative;
  padding: 22px 22px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: auto;
}

.rm-e-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line, #e4d9c8);
  background: #fff;
  color: var(--ink, #1c2b26);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.rm-e-close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.rm-e-titles {
  padding-right: 36px;
  margin-bottom: 4px;
}

.rm-e-titles h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
}

.rm-e-titles .en {
  font-size: 13px;
  color: var(--muted, #5e6b66);
  font-weight: 450;
  margin-top: 4px;
}

/* 沿用现站 .room-table 样式；弹窗里略收上下边距 */
.rm-e-side .room-table {
  margin: 10px 0 12px;
}

.rm-e-side .room-desc {
  margin: 0;
  flex: 0 1 auto;
}

.rm-e-switch {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line, #e4d9c8);
}

.rm-e-switch button {
  flex: 1;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line, #e4d9c8);
  background: #fff;
  color: var(--green-dark, #4E763E);
  font-size: 13px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
}

.rm-e-switch button svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.rm-e-switch button[disabled] {
  opacity: .35;
  cursor: default;
}

body.rm-e-modal-open {
  overflow: hidden;
}

.rm-e-modal[hidden],
.rm-e-overlay[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .rm-e-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-e-modal {
    grid-template-columns: 1fr;
    width: min(640px, calc(100vw - 24px));
    height: min(90vh, 760px);
  }
  .rm-e-photo { height: 280px; }
}

@media (max-width: 720px) {
  .rm-e-grid { grid-template-columns: 1fr; }
}
