/* Approved 3.2 room upper layout. No selectors or declarations for the six lower panes. */
@media (min-width:601px) {
  .rmu-room-upper .rmu-upper-grid {grid-column:1/-1;grid-row:3/8;display:grid;grid-template-columns:minmax(0,3.1fr) minmax(0,1fr);gap:12px;min-width:0;align-items:start}
  .rmu-room-upper .rmu-upper-left,.rmu-room-upper .rmu-upper-side {display:flex;flex-direction:column;gap:12px;min-width:0;align-items:stretch}
  .rmu-room-upper .rmu-upper-left>*,.rmu-room-upper .rmu-upper-side>* {flex:0 0 auto;min-width:0;max-width:100%;box-sizing:border-box;margin:0!important}
  .rmu-room-upper #detail-right-panel {display:none!important}
  .rmu-room-upper .rmu-upper-grid #ym-room-header {display:grid!important;grid-template-columns:minmax(0,1.18fr) minmax(0,1fr);gap:12px;height:320px!important;min-height:320px!important;max-height:320px!important;padding:0!important;border:0!important;box-shadow:none!important;background:transparent!important;overflow:visible!important;box-sizing:border-box}
  .rmu-room-upper .rmu-upper-grid #ym-rh-photos,.rmu-room-upper .rmu-upper-grid #ym-rh-info {height:320px!important;min-height:320px!important;max-height:320px!important;min-width:0!important;width:100%!important;box-sizing:border-box!important;border:1px solid #e2eaf3!important;border-radius:8px!important;background:#fff!important;box-shadow:0 2px 6px #29466a09!important}
  .rmu-room-upper .rmu-upper-grid #ym-rh-photos {position:relative;display:grid!important;grid-template-columns:minmax(0,1fr) 64px!important;grid-template-rows:minmax(0,1fr)!important;gap:0 8px;padding:0!important;overflow:hidden!important;flex:none!important}
  .rmu-room-upper .rmu-upper-grid #ym-rh-scroll {position:static!important;grid-column:1;grid-row:1!important;width:100%!important;height:100%!important;min-width:0;min-height:0;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;border-radius:7px 0 0 7px;scroll-snap-type:x mandatory}
  .rmu-room-upper .rmu-upper-grid .ym-rh-slide {width:100%!important;min-width:100%!important;height:100%!important;scroll-snap-align:start}
  .rmu-room-upper .rmu-upper-grid .ym-rh-slide img {width:100%!important;height:100%!important;object-fit:cover!important}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-strip,.rmu-photo-strip) {grid-column:2;grid-row:1!important;display:flex;flex-direction:column;gap:6px;min-height:0;margin:8px 8px 8px 0}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-strip,.rmu-photo-strip) button {flex:1;min-height:0;width:56px;padding:0;border:1px solid #dce5f0;border-radius:5px;background:#eff4fa;overflow:hidden;color:#607da4;cursor:pointer}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-strip,.rmu-photo-strip) img {width:100%;height:100%;object-fit:cover}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-arrow,.rmu-photo-arrow) {position:absolute;top:50%;transform:translateY(-50%);z-index:1;width:27px;height:27px;border:0;border-radius:50%;color:#fff;background:#1c2a4265;font-size:23px;line-height:1;cursor:pointer}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-arrow,.rmu-photo-arrow).prev {left:8px}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-photo-arrow,.rmu-photo-arrow).next {right:76px}
  .rmu-room-upper .rmu-upper-grid .rmp-photo-heading {position:absolute;top:8px;right:76px;z-index:2;font-size:0;line-height:0;min-height:0;display:block}
  .rmu-room-upper .rmu-upper-grid .ym-rh-edit-overlay {font-size:12px!important;line-height:20px;background:#ffffffeb!important;color:#2563eb!important}
  .rmu-room-upper .rmu-upper-grid #ym-rh-count {bottom:8px!important;right:76px!important}
  .rmu-room-upper .rmu-upper-grid #ym-rh-info {display:flex!important;flex-direction:column;gap:8px;padding:14px!important;overflow:visible!important;flex:none!important}
  .rmu-room-upper .rmu-upper-grid :is(.rmp-status-heading,.rmu-status-heading) {font-size:14px;font-weight:700;color:#243d60;min-height:22px}
  .rmu-room-upper .rmu-upper-grid .ym-rh-status-row {flex-wrap:wrap;gap:6px;margin:0!important;padding-bottom:10px;border-bottom:1px solid #edf2f7}
  .rmu-room-upper .rmu-upper-grid #ym-rh-price {font-size:24px!important;color:#385da0!important}
  .rmu-room-upper .rmu-upper-grid #ym-rh-device-tags {display:flex!important;flex-direction:column!important;gap:0!important;flex:1;min-height:0}
  .rmu-room-upper .rmu-upper-grid #ym-rh-device-tags :is(.v2-devrow,.v2-line-clean) {display:flex;align-items:center;gap:8px;min-height:29px;border-bottom:1px solid #edf2f7}
  .rmu-room-upper .rmu-upper-grid #ym-rh-device-tags :is(.d-val,.v2-clean-tag) {margin-left:auto}
  .rmu-room-upper .rmu-upper-grid #ym-rh-device-tags .v2-sep {display:none}
  .rmu-room-upper .rmu-upper-grid #ym-rh-consult {margin-top:0!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip {display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:7px!important;padding:9px!important;width:100%!important;min-width:0!important;box-sizing:border-box;grid-auto-flow:row;align-self:stretch;background:#fff;border:1px solid #e2eaf3;border-radius:8px}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip>:is(#ym-room-actions,#ym-room-smart-actions) {display:contents!important}
  /* Native host visibility and per-control permission hiding always win over flattening. */
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip :is(#ym-room-actions,#ym-room-smart-actions,.ra-btn,.sa-btn):is([hidden],[style*="display: none"],[style*="display:none"]) {display:none!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip :is(.ra-btn,.sa-btn) {display:flex;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;box-sizing:border-box!important;height:58px!important;min-height:58px!important;min-width:0!important;width:auto!important;margin:0!important;padding:8px 2px!important;border:1px solid #e3eaf6!important;border-radius:6px!important;background:#f5f8ff!important;color:#526f9f!important;box-shadow:none!important;font-size:12px!important;font-weight:500!important;line-height:1.35!important;transform:none!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip .rb-ic {display:block;font-size:16px!important;line-height:18px!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip [data-perm-action="checkout"] {background:#fffafa!important;border-color:#f0e3e3!important;color:#a96e6e!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip :is([data-perm-action="renew"],[data-perm-action="password_issue"]) {background:#edf4ff!important;border-color:#d8e5f7!important;color:#426b9e!important}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip [data-perm-action="power_off"] {background:#f8fafc!important;color:#64748b!important}
  .rmu-room-upper .rmu-upper-side #ym-tenant-card {width:100%!important;min-width:0;align-self:stretch;max-height:none!important}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2 {width:100%;min-width:0;box-sizing:border-box;max-height:none!important;border:1px solid #e2eaf3!important;border-radius:8px!important;background:#fff!important;padding:10px 12px!important;box-shadow:0 2px 6px #29466a09!important}
  .rmu-room-upper .rmu-upper-side .v2-idrow {display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important;padding:0 0 6px!important}
  .rmu-room-upper .rmu-upper-side .v2-who {min-width:0!important;width:auto!important}
  .rmu-room-upper .rmu-upper-side .v2-namerow {display:flex!important;align-items:center!important;gap:6px!important;flex-wrap:nowrap!important;min-width:0}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2__name {min-width:0;white-space:normal!important;overflow:visible!important;overflow-wrap:anywhere}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2__status {flex:none;white-space:nowrap}
  .rmu-room-upper .rmu-upper-side .v2-det {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important;padding:2px 0 5px!important}
  .rmu-room-upper .rmu-upper-side .v2-det-row {display:grid!important;grid-template-columns:86px minmax(0,1fr) auto!important;align-items:start!important;gap:6px!important;min-width:0;flex-wrap:nowrap!important}
  .rmu-room-upper .rmu-upper-side .v2-det-lb {width:auto!important;min-width:0}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2__detail-value {min-width:0;white-space:normal!important;overflow-wrap:anywhere;overflow:visible!important}
  .rmu-room-upper .rmu-upper-side .v2-period {display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px 6px!important;align-items:center!important;min-width:0;white-space:normal!important;padding:6px 0!important}
  .rmu-room-upper .rmu-upper-side .v2-period .v2-plb {grid-column:1/-1}
  .rmu-room-upper .rmu-upper-side .v2-period strong {min-width:0;white-space:normal!important;overflow-wrap:anywhere}
  .rmu-room-upper .rmu-upper-side .v2-period strong>span {display:inline-block;margin-inline:4px}
  .rmu-room-upper .rmu-upper-side .v2-period>button {margin-left:0!important;justify-self:end}
  .rmu-room-upper .rmu-upper-side .v2-g3 {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:4px!important;padding:5px 0!important}
  .rmu-room-upper .rmu-upper-side .v2-g3 .v2-cell {display:grid!important;grid-template-columns:74px minmax(0,1fr) auto!important;align-items:baseline!important;gap:6px!important;min-width:0;text-align:left!important;padding:2px 0!important;border-right:0!important}
  .rmu-room-upper .rmu-upper-side .v2-cell-vl {min-width:0;white-space:normal!important;overflow-wrap:anywhere}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2__billing {min-height:0!important;padding:5px 0 0!important}
  .rmu-room-upper .rmu-upper-side .drp-followup {width:100%;box-sizing:border-box;border:1px solid #e2eaf3!important;border-radius:8px!important;background:#fff!important;padding:14px!important;margin:0!important}
  .rmu-room-upper .rmu-upper-side .drp-followup textarea {box-sizing:border-box;width:100%;min-height:74px;font-size:12px;border:1px solid #dfe7f1;border-radius:5px;background:#fafcff;padding:8px;resize:vertical}
}
@media (min-width:601px) and (max-width:1100px) {
  .rmu-room-upper .rmu-upper-grid {display:flex;flex-direction:column;width:100%;align-items:stretch}
  .rmu-room-upper .rmu-upper-left,.rmu-room-upper .rmu-upper-side {width:100%;flex:0 0 auto}
  .rmu-room-upper .rmu-upper-grid .rmu-action-strip {grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .rmu-room-upper .rmu-upper-side #ym-tenant-card,.rmu-room-upper .rmu-upper-side .tenant-card-v2 {height:auto!important;min-height:0!important;max-height:none!important}
}
@media (min-width:1101px) {
  .rmu-room-upper .rmu-upper-side #ym-tenant-card,.rmu-room-upper .rmu-upper-side .tenant-card-v2 {height:320px!important;min-height:320px!important;max-height:320px!important;box-sizing:border-box!important}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2 {display:flex!important;flex-direction:column!important}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2>* {flex-shrink:0}
  .rmu-room-upper .rmu-upper-side .tenant-card-v2__billing {margin-top:auto!important;flex-shrink:1;overflow:auto}
}

/* Keep native non-info panes below the Tab row when the upper wrapper occupies rows 3–7. */
@media (min-width:769px) {
  .rmu-room-upper.rmp-info #dt-shared-top:empty {display:none!important}
  .rmu-room-upper.rmp-info :is(#dt-device,#dt-contract,#dt-finance).active {grid-column:1/10;grid-row:9;display:block!important;min-width:0;width:auto!important;padding:0!important;margin:0!important}
}

/* Keep the vacant room sidebar card aligned with the room photo. */
@media(min-width:1101px){
 .rmu-room-upper .rmu-upper-side .tc-vacant{height:320px!important;min-height:320px!important;max-height:320px!important;box-sizing:border-box!important}
}

/* Room-only amenities reuse native room tags below the follow-up note. */
@media (min-width:601px) {
  .rmu-room-upper .rmu-upper-side .rmu-room-amenities {width:100%;box-sizing:border-box;margin:0!important;padding:14px!important;border:1px solid #e2eaf3!important;border-radius:8px!important;background:#fff!important;box-shadow:0 2px 6px #29466a09!important;min-height:0}
  .rmu-room-upper .rmu-room-amenities>.gc-title {display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 12px!important;padding:0 0 10px!important;border-bottom:1px solid #edf2f7;font-size:14px!important;font-weight:700;color:#243d60}
  .rmu-room-upper .rmu-room-amenities>.gc-title>span {font-size:12px!important;font-weight:500;white-space:nowrap}
  .rmu-room-upper .rmu-room-amenities .rmu-amenity-label {font-size:12px;color:#8496b1;margin-bottom:8px}
  .rmu-room-upper .rmu-room-amenities .fac-tag-wrap {gap:6px!important;padding:0!important}
  .rmu-room-upper .rmu-room-amenities .fac-tag[data-rmu-selected="0"] {display:none!important}
  .rmu-room-upper .rmu-room-amenities .fac-tag[data-rmu-selected="1"] {font-size:12px!important;line-height:20px!important;padding:1px 7px!important;border:1px solid #dbeafe!important;border-radius:4px!important;background:#eff6ff!important;color:#2563eb!important;font-weight:500;max-width:100%;white-space:normal;overflow-wrap:anywhere}
  .rmu-room-upper .rmu-room-amenities .rmu-amenity-empty {font-size:12px;line-height:20px;color:#94a3b8}
}

/* Extend into the existing right-hand whitespace without shifting the left Tab row. */
@media (min-width:1101px) {
  .rmu-room-upper .rmu-upper-side {position:relative}
  .rmu-room-upper .rmu-upper-side .rmu-room-amenities {position:absolute;top:calc(100% + 12px);left:0;right:0}
}

/* Compact room information: sidebar spans the information stack, not the upper row.
   Native follow-ups replace the legacy note editor; neither record store is changed. */
@media(min-width:769px){
 body #desktop-house-detail-modal .rmu-room-upper .drp-followup{display:none!important}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-side>.rmp-follow{
  display:block!important;width:100%;min-width:0;padding:14px!important;margin:0!important;
  background:#fff!important;border:1px solid #e2eaf3!important;border-radius:8px!important;
  box-shadow:0 2px 6px #29466a09!important;box-sizing:border-box;
 }
 body #desktop-house-detail-modal .rmu-room-upper .rmp-follow .fu-item{flex-wrap:wrap;align-items:flex-start!important}
 body #desktop-house-detail-modal .rmu-room-upper .rmp-follow .fu-text{flex-basis:100%!important;overflow-wrap:anywhere}
 body #desktop-house-detail-modal .rmu-room-upper .rmp-follow .fu-meta{white-space:normal!important;overflow-wrap:anywhere}
}
@media(min-width:1101px){
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info>.detail-content{grid-template-rows:repeat(8,max-content)!important}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-grid{display:contents!important}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-left{grid-column:1/10;grid-row:3;gap:10px}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-side{grid-column:10/-1;grid-row:3/9;gap:10px;position:static;align-self:start}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-side .rmu-room-amenities{position:static!important;inset:auto!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info #detail-tabs{grid-row:4!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-base{grid-column:1/10!important;grid-row:5!important;align-self:start}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-community{grid-column:1/5!important;grid-row:6!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-intro{grid-column:5/10!important;grid-row:6!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-business{grid-column:1/4!important;grid-row:7!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-metro{grid-column:4/7!important;grid-row:7!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-org{grid-column:7/10!important;grid-row:7!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-service{grid-column:1/4!important;grid-row:8!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-policy{grid-column:4/7!important;grid-row:8!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info .rmp-note{grid-column:7/10!important;grid-row:8!important;min-height:0!important}
 body #desktop-house-detail-modal .rmu-room-upper.rmp-info :is(#dt-device,#dt-contract,#dt-finance,#dt-workorder,#dt-log).active{grid-column:1/10!important;grid-row:5/9!important;align-self:start}
}

@media(min-width:769px){
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-side>.rmp-follow .gc-title>[onclick]{width:auto!important;height:auto!important;min-height:28px;padding:2px 8px!important;border-radius:5px!important;background:#edf4ff!important;color:#2563eb!important;box-shadow:none!important;white-space:nowrap}
 body #desktop-house-detail-modal .rmu-room-upper .rmu-upper-side>.rmp-follow .followup-list{font-size:14px!important;line-height:24px;color:#374151}
}
