.climate-gauge {
  position: relative;
  width: min(340px, 100%);
  height: 232px;
  margin: 0 auto;
}

.backdrop {
  transition: background-image .45s ease, filter 1.15s cubic-bezier(.2, .72, .2, 1);
}

.cinema-screen-video {
  position: fixed;
  z-index: 1;
  left: 25.96vw;
  top: 16.05vh;
  width: 48.06vw;
  height: 27.95vh;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
  pointer-events: none;
  transition: filter 1.15s cubic-bezier(.2, .72, .2, 1), opacity .35s ease;
}

.cinema-screen-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, .045), transparent 30%, transparent 76%, rgba(61, 96, 116, .04));
  pointer-events: none;
}

.app[data-room="cinema"] .backdrop {
  transform: none;
}

.cinema-screen-video[hidden] {
  display: none;
}

.cinema-screen-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #000;
  opacity: 0;
  transition: opacity .28s ease;
}

.cinema-screen-video[data-started="true"] video {
  opacity: 1;
}

.cinema-media-page {
  position: relative;
  min-height: 100%;
}

.cinema-media-copy {
  position: absolute;
  left: 0;
  bottom: 24px;
  max-width: 520px;
  text-shadow: 0 4px 22px #000;
}

.cinema-media-copy h1 {
  margin: 9px 0 10px;
  font: 300 58px/1 Georgia, serif;
}

.cinema-media-copy p {
  color: #c9d0d0;
}

.cinema-transport {
  position: absolute;
  right: 0;
  bottom: 24px;
  width: 410px;
  padding: 22px;
  border: 1px solid rgba(235, 226, 207, .2);
  border-radius: 22px;
  background: rgba(7, 14, 18, .82);
  backdrop-filter: blur(24px) saturate(120%);
  box-shadow: 0 24px 65px rgba(0, 0, 0, .4);
}

.cinema-transport > strong {
  display: block;
  margin: 8px 0 18px;
  font: 400 25px Georgia, serif;
}

.cinema-transport > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.cinema-transport button {
  min-height: 48px;
  border: 1px solid rgba(235, 226, 207, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .04);
  color: #f1ece2;
  cursor: pointer;
}

.cinema-transport button.active {
  border-color: #d9b36f;
  background: rgba(212, 173, 103, .2);
  color: #f5dba8;
}

.cinema-volume {
  grid-template-columns: 48px 1fr 48px !important;
  align-items: center;
  margin-top: 10px;
}

.cinema-volume span {
  text-align: center;
  color: #b9c1c1;
}

.cinema-volume b {
  color: #f0d398;
}

.cinema-transport > small {
  display: block;
  margin-top: 14px;
  color: #899696;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.climate-gauge svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.gauge-glass {
  fill: url(#dialGlass);
  stroke: rgba(240, 211, 152, .08);
  stroke-width: 1;
}

.gauge-ticks line {
  stroke: rgba(255, 255, 255, .24);
  stroke-width: 1;
}

.gauge-ticks line.major {
  stroke: rgba(240, 211, 152, .6);
  stroke-width: 1.4;
}

.gauge-base,
.gauge-color {
  fill: none;
  stroke-linecap: round;
  stroke-width: 11;
}

.gauge-base {
  stroke: rgba(255, 255, 255, .075);
}

.gauge-color {
  stroke: url(#temperatureGradient);
  filter: drop-shadow(0 0 8px rgba(75, 173, 221, .18));
  animation: climate-glow 2.8s ease-in-out infinite;
}

.temp-marker {
  transform-origin: 130px 125px;
  transition: transform .55s cubic-bezier(.22, .8, .24, 1);
}

.marker-halo {
  fill: rgba(6, 14, 18, .92);
  stroke: #e7c884;
  stroke-width: 2;
  filter: drop-shadow(0 0 7px rgba(231, 200, 132, .46));
}

.marker-dot {
  fill: #fff8e8;
}

.gauge-number {
  fill: rgba(215, 224, 224, .58);
  font: 7px Inter, Arial, sans-serif;
  letter-spacing: .08em;
}

.gauge-number.start { text-anchor: start; }
.gauge-number.middle { text-anchor: middle; }
.gauge-number.end { text-anchor: end; }

.thermostat-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 8%, rgba(75, 116, 139, .16), transparent 48%),
    linear-gradient(160deg, rgba(14, 26, 33, .78), rgba(5, 11, 15, .9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 22px 48px rgba(0, 0, 0, .28);
}

.climate-readout {
  position: absolute;
  left: 50%;
  top: 79px;
  bottom: auto;
  width: 170px;
  transform: translateX(-50%);
  text-align: center;
}

.climate-symbol {
  display: block;
  margin-bottom: 5px;
  color: #dabb7d;
  font: 400 16px Georgia, serif;
  opacity: .9;
}

.climate-readout strong {
  display: block;
  font: 300 48px/1 Inter, Arial, sans-serif;
  letter-spacing: -.035em;
  color: #fff;
}

.climate-readout sup {
  position: relative;
  top: -18px;
  margin-left: 2px;
  color: #d7bd87;
  font-size: 17px;
}

.climate-readout small {
  display: block;
  margin-top: 5px;
  color: #aab5b6;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.climate-current {
  position: absolute;
  left: 50%;
  bottom: 2px;
  display: flex;
  align-items: center;
  gap: 9px;
  transform: translateX(-50%);
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(4, 10, 14, .5);
  white-space: nowrap;
}

.climate-current span {
  color: #879597;
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.climate-current b {
  color: #e9e3d7;
  font-size: 11px;
  font-weight: 500;
}

.thermostat-card .temp-stepper {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}

.thermostat-card .temp-stepper button {
  border-color: rgba(212, 173, 103, .32);
  border-radius: 50%;
  background: rgba(212, 173, 103, .08);
  color: #f0d398;
}

.door-control .unlock {
  border-color: #67d49a;
  background: rgba(45, 126, 82, .28);
  color: #aaf0c9;
}

.door-control .lock {
  border-color: #df766f;
  background: rgba(141, 49, 47, .28);
  color: #ffb6b1;
}

.dining-flow-hint,
.cart-confirm-hint {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(212, 173, 103, .09);
  color: #e7dcc5;
  font-size: 12px;
  line-height: 1.55;
}

/* Panels have no keyboard: never expose the former free-text dining field. */
.cart .notes,
.cart #orderNotes {
  display: none !important;
}

.cart-fab {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  width: min(440px, 100%);
  margin: 22px 0 4px auto;
  border-color: rgba(226, 189, 140, .72);
  background: linear-gradient(135deg, rgba(23, 28, 29, .97), rgba(11, 17, 19, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .025), 0 10px 30px rgba(0, 0, 0, .22);
  text-align: left;
}

.cart-fab > * {
  position: relative;
  z-index: 2;
}

.cart-fab b {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
  text-align: center;
}

.cart-fab small {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #df9a94;
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cart-fab.has-items {
  background: linear-gradient(135deg, rgba(42, 39, 31, .98), rgba(14, 19, 20, .98));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035), 0 12px 35px rgba(0, 0, 0, .3);
}

.cart-fab.has-items::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -25%;
  bottom: -25%;
  left: -46px;
  width: 36px;
  background: linear-gradient(90deg, transparent 0 6px, rgba(255, 245, 213, .92) 7px 8px, transparent 9px 25px, rgba(255, 245, 213, .62) 26px 27px, transparent 28px);
  transform: skewX(-17deg);
  animation: dining-send-lines 3.2s ease-in-out infinite;
  pointer-events: none;
}

.cart-fab.has-items::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 3px;
  border: 1px solid rgba(240, 211, 152, .16);
  pointer-events: none;
}

/* The deck room list grows with its contents instead of masking the yacht. */
@media (min-width: 621px) {
  .deck-view {
    align-items: start;
  }

  .room-list-panel {
    align-self: start;
    height: auto;
    max-height: calc(100dvh - 142px);
    overflow: auto;
  }
}

.cart-fab.has-items small {
  color: #f0d398;
}

.dining-sent-confirmation {
  position: relative;
  isolation: isolate;
  flex: 1 1 auto;
  width: 100%;
  min-height: 360px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  padding: 36px;
  overflow: hidden;
  border: 1px solid rgba(226, 189, 140, .2);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(4, 12, 17, .76), rgba(5, 13, 18, .9)),
    url('assets/imperia-exterior.png') center center / cover no-repeat;
  box-shadow: inset 0 0 80px rgba(1, 6, 9, .45);
  color: #f5efe4;
  text-align: center;
}

.dining-sent-confirmation > span {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(112, 211, 156, .72);
  border-radius: 50%;
  background: rgba(52, 132, 88, .2);
  color: #b9f4d2;
  font-size: 31px;
  box-shadow: 0 0 28px rgba(82, 183, 126, .16);
}

.dining-success-icon .ui-check-icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dining-sent-confirmation h3 {
  max-width: 560px;
  margin: 0;
  font: 400 25px/1.35 Georgia, serif;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .9);
}

.dining-sent-confirmation p {
  margin: 0;
  color: #aeb9b6;
  font-size: 11px;
  letter-spacing: .16em;
}

.service-dining-launcher {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(226, 189, 140, .5);
  border-radius: 14px;
  background: #0b1216;
  color: #f4f1ea;
  text-align: left;
  cursor: pointer;
}

.service-dining-launcher > img,
.service-dining-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.service-dining-launcher > img {
  object-fit: cover;
  object-position: center 56%;
  transition: transform .35s ease;
}

.service-dining-launcher:hover > img {
  transform: scale(1.025);
}

.service-dining-shade {
  background: linear-gradient(90deg, rgba(3, 8, 11, .96), rgba(3, 8, 11, .57) 52%, rgba(3, 8, 11, .12));
}

.service-dining-copy {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 180px;
  max-width: 570px;
  flex-direction: column;
  justify-content: center;
  padding: 24px 30px;
}

.service-dining-copy small {
  color: var(--gold2);
  font-size: 9px;
  letter-spacing: .19em;
}

.service-dining-copy b {
  margin-top: 8px;
  font: 400 30px Georgia, serif;
}

.service-dining-copy em {
  margin-top: 8px;
  color: #c2cccc;
  font-size: 12px;
  font-style: normal;
}

.service-dining-copy i {
  width: max-content;
  margin-top: 16px;
  padding: 9px 13px;
  border: 1px solid var(--gold);
  border-radius: 7px;
  background: rgba(212, 173, 103, .14);
  color: var(--gold2);
  font-size: 10px;
  font-style: normal;
  letter-spacing: .08em;
}

.service-menu-card {
  min-height: 225px;
  border-radius: 15px;
  background: #071014;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
}

.service-menu-card > img {
  top: 0;
  bottom: auto;
  height: 54%;
  object-position: center;
}

.service-menu-card .service-card-shade {
  top: 0;
  bottom: auto;
  height: 54%;
  background: linear-gradient(0deg, rgba(4, 10, 13, .72), transparent 58%);
  pointer-events: none;
}

.service-menu-card .service-card-copy {
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 47%;
  padding: 14px 54px 14px 16px;
  border-top: 1px solid rgba(235, 226, 207, .08);
  background: rgba(5, 13, 17, .985);
}

.service-menu-card .service-card-copy small {
  color: #dabc86;
  font-size: 8px;
  letter-spacing: .13em;
}

.service-menu-card .service-card-copy b {
  margin-top: 7px;
  font-size: 19px;
}

.service-menu-card .service-card-copy em {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: #aeb9b9;
  font-size: 9px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.service-card-link {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(226, 189, 140, .85);
  border-radius: 50%;
  background: transparent;
  color: var(--gold2);
  font-size: 17px;
  line-height: 1;
}

.service-menu-card:hover .service-card-link,
.service-menu-card:focus-visible .service-card-link {
  background: rgba(212, 173, 103, .24);
  box-shadow: 0 0 0 1px rgba(226, 189, 140, .18);
}

#sendOrder:disabled {
  cursor: not-allowed;
  filter: grayscale(1);
  opacity: .45;
}

.cart #sendOrder {
  position: relative;
  isolation: isolate;
  min-height: 54px;
  overflow: hidden;
  padding: 0;
  border: 1px solid #e6c77e;
  border-radius: 3px;
  background: linear-gradient(180deg, #e8c984 0%, #c79b50 100%);
  box-shadow: inset 0 1px rgba(255, 244, 206, .62), 0 8px 24px rgba(111, 76, 25, .22);
}

.cart #sendOrder::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: -25%;
  bottom: -25%;
  left: -46px;
  width: 36px;
  background: linear-gradient(90deg,
    transparent 0 7px,
    rgba(255, 248, 220, .78) 8px,
    rgba(255, 255, 255, .98) 9px,
    transparent 10px 22px,
    rgba(255, 248, 220, .58) 23px,
    rgba(255, 255, 255, .9) 24px,
    transparent 25px 100%);
  transform: skewX(-17deg);
  filter: drop-shadow(0 0 4px rgba(255, 238, 188, .42));
  animation: dining-send-lines 3.2s cubic-bezier(.32, .66, .4, 1) infinite;
}

.cart #sendOrder::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 2px;
  border: 1px solid rgba(255, 243, 205, .34);
  border-radius: 1px;
  pointer-events: none;
}

.cart #sendOrder > span {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 50px;
  place-items: center;
  padding: 0 18px;
}

.cart #sendOrder:disabled::before {
  animation: none;
}

@keyframes dining-send-lines {
  0%, 24% { left: -46px; opacity: 0; }
  31% { opacity: 1; }
  68% { left: calc(100% + 12px); opacity: 1; }
  74%, 100% { left: calc(100% + 12px); opacity: 0; }
}

.room-detail {
  position: relative;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(520px, 1fr) 360px;
  align-items: end;
  gap: 28px;
}

.room-back {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(235, 226, 207, .22);
  border-radius: 12px;
  background: rgba(7, 14, 18, .58);
  backdrop-filter: blur(18px);
  color: #e9e3d8;
  cursor: pointer;
}

.room-detail-copy {
  align-self: end;
  max-width: 850px;
  padding-bottom: 32px;
}

.room-detail-copy h1 {
  margin: 11px 0 16px;
  font: 300 clamp(54px, 6vw, 92px)/.94 Georgia, serif;
  letter-spacing: -.045em;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .55);
}

.room-detail-copy > p {
  max-width: 610px;
  margin: 0;
  color: #d1d7d5;
  font-size: 15px;
  line-height: 1.65;
  text-shadow: 0 3px 15px rgba(0, 0, 0, .65);
}

.room-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 25px;
}

.room-live-panel {
  align-self: start;
  margin-top: 18px;
  padding: 22px;
  border: 1px solid rgba(235, 226, 207, .18);
  border-radius: 24px;
  background: rgba(8, 16, 20, .25);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  backdrop-filter: blur(10px) saturate(108%);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .18);
}

.room-live-panel h2 {
  margin: 7px 0 17px;
  font: 400 25px Georgia, serif;
}

.room-live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.room-live-grid button {
  min-height: 108px;
  padding: 14px;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 15px;
  background: rgba(255, 255, 255, .035);
  color: #f0ece4;
  text-align: left;
  cursor: pointer;
}

.room-live-grid button:hover {
  border-color: rgba(226, 189, 140, .62);
  background: rgba(196, 154, 103, .11);
}

.room-live-grid span {
  color: #e2bd8c;
  font-size: 17px;
}

.room-live-grid b,
.room-live-grid small {
  display: block;
}

.room-service-dock {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid rgba(235, 226, 207, .14);
}

.room-service-dock > span {
  margin-bottom: 2px;
  color: #d9b77e;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .16em;
}

.room-service-dock button {
  position: relative;
  min-height: 64px;
  padding: 10px 12px 10px 48px;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 13px;
  background: rgba(255, 255, 255, .028);
  color: #f0ece4;
  text-align: left;
  cursor: pointer;
}

.room-service-dock button:hover {
  border-color: rgba(226, 189, 140, .58);
  background: rgba(196, 154, 103, .1);
}

.room-service-dock button.dining {
  border-color: rgba(226, 189, 140, .5);
  background: linear-gradient(100deg, rgba(196, 154, 103, .16), rgba(255, 255, 255, .025));
}

.room-service-dock i {
  position: absolute;
  left: 13px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
  border: 1px solid rgba(226, 189, 140, .42);
  border-radius: 50%;
  color: #e4bf87;
  font-style: normal;
}

.room-service-dock b,
.room-service-dock small {
  display: block;
}

.room-service-dock b {
  font: 400 14px Georgia, serif;
}

.room-service-dock small {
  margin-top: 4px;
  color: #9eaaa9;
  font-size: 8px;
  line-height: 1.35;
}

.room-live-grid b {
  margin-top: 15px;
  font-size: 18px;
  font-weight: 500;
}

.room-live-grid small {
  margin-top: 4px;
  color: #98a5a4;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.app[data-device="tsw"] .room-detail {
  grid-template-columns: minmax(390px, 1fr) 315px;
  gap: 18px;
}

.app[data-device="tsw"] .room-detail-copy {
  padding-bottom: 8px;
}

.app[data-device="tsw"] .room-detail-copy h1 {
  font-size: 54px;
}

.app[data-device="tsw"] .room-live-panel {
  padding: 16px;
}

.app[data-device="tsw"] .room-live-grid button {
  min-height: 86px;
}

.app[data-device="tsw"] .room-service-dock {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
}

.app[data-device="tsw"] .room-service-dock > span,
.app[data-device="tsw"] .room-service-dock .dining {
  grid-column: 1 / -1;
}

.app[data-device="tsw"] .room-service-dock button {
  min-height: 54px;
  padding-left: 42px;
}

.room-drawer-backdrop {
  position: fixed;
  z-index: 20;
  inset: 88px 0 0 112px;
  background: rgba(2, 7, 10, .28);
  backdrop-filter: blur(3px);
  animation: drawer-fade-in .3s ease both;
}

.room-drawer {
  position: fixed;
  z-index: 22;
  left: calc(50% + 56px);
  bottom: 0;
  width: min(1120px, calc(100vw - 168px));
  max-height: 68vh;
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid rgba(226, 189, 140, .48);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(155deg, rgba(14, 25, 31, .98), rgba(5, 11, 15, .985));
  box-shadow: 0 -28px 80px rgba(0, 0, 0, .55);
  animation: room-drawer-in .48s cubic-bezier(.2, .86, .26, 1) both;
}

.room-drawer {
  top: 56%;
  bottom: auto;
  max-height: 74vh;
  transform: translate(-50%, -50%);
  border-bottom: 1px solid rgba(226, 189, 140, .48);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
  animation: dining-popup-in .42s cubic-bezier(.2, .86, .26, 1) both;
}

.room-drawer .room-drawer-content {
  max-height: calc(74vh - 78px);
}

@keyframes xpanel-popup-top-in {
  from { opacity: 0; transform: translate(-50%, 34px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.app[data-device="xpanel"] .room-drawer {
  top: 96px;
  bottom: auto;
  max-height: calc(100dvh - 118px);
  transform: translateX(-50%);
  animation: xpanel-popup-top-in .38s cubic-bezier(.2, .86, .26, 1) both;
}

.app[data-device="xpanel"] .room-drawer .room-drawer-content {
  max-height: calc(100dvh - 196px);
}

.app[data-device="xpanel"] .room-drawer[data-panel="lights"],
.app[data-device="xpanel"] .room-drawer[data-panel="controls"],
.app[data-device="xpanel"] .room-drawer[data-panel="scenes"],
.app[data-device="xpanel"] .room-drawer[data-panel="climate"] {
  top: 340px;
  width: min(1100px, calc(100vw - 168px));
  background: rgba(8, 16, 20, .25);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  backdrop-filter: blur(10px) saturate(108%);
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18);
}

.room-drawer-backdrop[data-panel="lights"],
.room-drawer-backdrop[data-panel="controls"],
.room-drawer-backdrop[data-panel="scenes"],
.room-drawer-backdrop[data-panel="climate"] {
  background: rgba(2, 7, 10, .08);
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

.room-drawer[data-panel="lights"] .drawer-light-grid article,
.room-drawer[data-panel="controls"] .drawer-light-grid article {
  background: rgba(8, 16, 20, .25);
}

.room-drawer[data-panel="scenes"] .drawer-scene-grid button {
  background: rgba(8, 16, 20, .25);
}

.room-drawer[data-panel="scenes"] .drawer-scene-grid button.active {
  background: linear-gradient(145deg, rgba(196, 154, 103, .22), rgba(8, 16, 20, .25));
}

.room-drawer[data-panel="climate"] .room-drawer-climate .thermostat-card,
.room-drawer[data-panel="climate"] .room-drawer-climate .mobile-option-card {
  background: rgba(8, 16, 20, .25);
  -webkit-backdrop-filter: blur(6px) saturate(106%);
  backdrop-filter: blur(6px) saturate(106%);
}

/* XPanel climate card: fit completely inside the marked central image area. */
.app[data-device="xpanel"] .room-drawer[data-panel="climate"] {
  top: 270px;
  left: calc(50% + 10px);
  width: min(1060px, calc(100vw - 190px));
  max-height: calc(100dvh - 290px);
}

.app[data-device="xpanel"] .room-drawer[data-panel="climate"] > header {
  min-height: 70px;
  padding-block: 11px;
}

.app[data-device="xpanel"] .room-drawer[data-panel="climate"] .room-drawer-content {
  max-height: calc(100dvh - 370px);
  padding: 12px 24px 18px;
}

.room-drawer > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 15px 20px 13px 24px;
  border-bottom: 1px solid rgba(235, 226, 207, .13);
  background: rgba(255, 255, 255, .018);
}

.room-drawer > header h2 {
  margin: 5px 0 0;
  font: 400 27px Georgia, serif;
}

.room-drawer-close {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(235, 226, 207, .22);
  border-radius: 50%;
  background: rgba(255, 255, 255, .035);
  color: #f1ede4;
  font-size: 27px;
  cursor: pointer;
}

.room-drawer-content {
  max-height: calc(68vh - 78px);
  overflow: auto;
  padding: 18px 24px 24px;
}

.room-drawer-climate {
  display: grid;
  grid-template-columns: 350px minmax(420px, 1fr);
  gap: 16px;
}

.room-drawer-climate .thermostat-card,
.room-drawer-climate .mobile-option-card {
  margin: 0;
  border-radius: 16px;
}

.room-drawer-climate .climate-gauge {
  height: 205px;
  width: 300px;
}

.room-drawer-climate .climate-readout {
  top: 68px;
}

.drawer-scene-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 9px;
}

.drawer-scene-grid button {
  min-height: 128px;
  padding: 16px;
  border: 1px solid rgba(235, 226, 207, .16);
  border-radius: 15px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  color: #f0ece4;
  text-align: left;
  cursor: pointer;
}

.drawer-scene-grid button.active {
  border-color: rgba(226, 189, 140, .72);
  background: linear-gradient(145deg, rgba(196, 154, 103, .22), rgba(255, 255, 255, .025));
  box-shadow: inset 0 0 0 1px rgba(226, 189, 140, .18);
}

.drawer-scene-grid span {
  color: #d8ba87;
  font-size: 9px;
  letter-spacing: .12em;
}

.drawer-scene-grid b {
  display: block;
  margin-top: 52px;
  font: 400 18px Georgia, serif;
}

.drawer-media {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  align-items: center;
  gap: 25px;
  min-height: 170px;
}

.drawer-media h3 {
  margin: 8px 0;
  font: 400 30px Georgia, serif;
}

.drawer-media p {
  color: #aeb9b8;
}

.drawer-media-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.drawer-media-actions button {
  min-height: 58px;
  border: 1px solid rgba(235, 226, 207, .18);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
  color: #eee9df;
}

.drawer-controls {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.drawer-light-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.drawer-light-grid article {
  padding: 14px;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.drawer-light-grid span,
.drawer-light-grid strong {
  display: block;
}

.drawer-light-grid span {
  color: #aab5b4;
  font-size: 10px;
}

.drawer-light-grid strong {
  margin: 8px 0 12px;
  color: #e1c28b;
  font-size: 17px;
}

.drawer-light-grid input {
  width: 100%;
  accent-color: var(--gold);
}

.drawer-light-only {
  max-width: 860px;
  margin: 0 auto;
}

.drawer-light-only .drawer-light-grid {
  grid-template-columns: repeat(4, 1fr);
}

.drawer-light-only .drawer-light-grid article {
  min-height: 132px;
  padding: 18px;
}

.drawer-shades {
  padding: 16px;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.drawer-shades > div {
  display: grid;
  grid-template-columns: 1fr repeat(3, 40px);
  align-items: center;
  gap: 6px;
  margin-top: 13px;
}

.drawer-shades b {
  font-size: 11px;
  font-weight: 500;
}

.drawer-shades button {
  height: 38px;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
  color: #e8e2d7;
}

.drawer-shades-only {
  max-width: 780px;
  margin: 0 auto;
}

.drawer-shades-only .drawer-shades > div {
  grid-template-columns: 1fr 64px repeat(3, 40px);
}

.drawer-shades-only .drawer-shades strong {
  color: var(--gold2);
  font-size: 13px;
  text-align: right;
}

.drawer-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.drawer-dish {
  position: relative;
  min-height: 226px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(235, 226, 207, .15);
  border-radius: 13px;
  background: rgba(7, 13, 17, .88);
}

.drawer-dish > img {
  display: block;
  width: 100%;
  height: 104px;
  object-fit: cover;
  filter: saturate(.82) contrast(1.04);
}

.drawer-dish-copy {
  padding: 13px 48px 15px 15px;
}

.drawer-dish-copy small {
  color: #dabc86;
  font-size: 8px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.drawer-dish-copy h3 {
  margin: 9px 0 7px;
  font: 400 17px Georgia, serif;
}

.drawer-dish-copy p {
  margin: 0;
  color: #99a6a6;
  font-size: 9px;
  line-height: 1.45;
}

.drawer-dish > button {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 31px;
  height: 31px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  color: var(--gold2);
  font-size: 19px;
}

.room-drawer .cart-fab {
  margin-top: 16px;
}

/* Keep the dining review action anchored at the bottom of the open menu. */
@media (min-width: 621px) {
  .app[data-device="xpanel"] .room-drawer[data-panel="dining"] {
    top: 50%;
    left: calc(50% + 56px);
    height: min(780px, calc(100dvh - 140px));
    transform: translate(-50%, -50%);
    animation: dining-popup-in .42s cubic-bezier(.2, .86, .26, 1) both;
  }

  .app[data-device="tsw"] .room-drawer[data-panel="dining"] {
    top: 50%;
    left: calc(50% + 46px);
    height: min(608px, calc(100dvh - 120px));
    transform: translate(-50%, -50%);
  }

  .app[data-device="xpanel"] .room-drawer[data-panel="dining"] .room-drawer-content,
  .app[data-device="tsw"] .room-drawer[data-panel="dining"] .room-drawer-content {
    display: flex;
    flex-direction: column;
    height: calc(100% - 78px);
    max-height: none;
    overflow: hidden;
  }

  .room-drawer[data-panel="dining"] .dining-flow-hint,
  .room-drawer[data-panel="dining"] .menu-tabs,
  .room-drawer[data-panel="dining"] .cart-fab {
    flex: 0 0 auto;
  }

  .room-drawer[data-panel="dining"] .drawer-menu-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-right: 6px;
  }

  .room-drawer[data-panel="dining"] .cart-fab {
    position: relative;
    right: auto;
    bottom: auto;
    margin: 14px 0 0 auto;
  }
}

.scene-room-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: -12px 0 18px;
  padding: 13px 16px;
  border: 1px solid rgba(226, 189, 140, .28);
  border-radius: 13px;
  background: rgba(7, 14, 18, .6);
}

.scene-room-context b {
  display: block;
  margin-top: 5px;
  color: #e8e1d5;
}

.scene-room-context button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(235, 226, 207, .2);
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  color: #ebe5da;
}

@keyframes room-drawer-in {
  from { opacity: 0; transform: translate(-50%, 105%); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.online[data-status="connecting"] i,
.online[data-status="initializing"] i {
  background: #e2bd8c;
  box-shadow: 0 0 10px #e2bd8c;
  animation: connection-pulse 1.2s ease-in-out infinite;
}

.online[data-status="disconnected"] i,
.online[data-status="error"] i {
  background: #e56d67;
  box-shadow: 0 0 10px #e56d67;
}

/* XPanel-Verbindung: Hotel-21-Funktionsumfang in der Yacht-Gestaltung. */
.connection-tool {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(230, 201, 145, .3);
  border-radius: 50%;
  background: rgba(8, 14, 18, .72);
  color: var(--gold2);
  cursor: pointer;
}
.connection-tool:hover,
.connection-tool:focus-visible { border-color: var(--gold); background: rgba(212, 173, 103, .15); }
.connection-overlay[hidden] { display: none !important; }
.connection-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 7, 10, .82);
  backdrop-filter: blur(16px);
}
.connection-dialog {
  width: min(720px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(212, 173, 103, .65);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(14, 25, 31, .98), rgba(5, 12, 16, .98));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .7);
}
.connection-dialog-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
.connection-dialog-head small { color: var(--gold2); letter-spacing: .24em; }
.connection-dialog-head h2 { margin: 7px 0 0; font: 400 32px Georgia, serif; }
.connection-dialog-head button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: #fff; font-size: 24px; cursor: pointer; }
.connection-intro { color: var(--muted); line-height: 1.6; }
.connection-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.connection-fields label { display: grid; gap: 8px; color: var(--gold2); font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.connection-fields input { width: 100%; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: #091217; color: #fff; }
.connection-fields label.disabled { opacity: .4; }
.connection-login-option { display: flex; align-items: center; gap: 11px; margin: 18px 0; color: #dce2e2; }
.connection-login-option input { width: 20px; height: 20px; accent-color: var(--gold); }
.connection-warning,
.connection-error { min-height: 20px; color: #e8a49c; font-size: 12px; line-height: 1.55; }
.connection-certificate { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); background: rgba(8, 14, 18, .75); color: var(--gold2); cursor: pointer; }
.connection-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.connection-actions .primary,
.connection-actions .secondary { min-height: 46px; }
.app[data-device="tsw"] #openSettings,
.app[data-device="tsw"] #connectionRetry,
.app[data-device="mobile"] #openSettings,
.app[data-device="mobile"] #connectionRetry { display: none; }
@media (max-width: 700px) {
  .connection-overlay { padding: 10px; }
  .connection-dialog { padding: 20px; border-radius: 18px; }
  .connection-fields { grid-template-columns: 1fr; }
}

@keyframes connection-pulse {
  50% { opacity: .35; }
}

@keyframes drawer-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dining-popup-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 55px)); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.app[data-device="tsw"] .room-drawer-backdrop {
  inset: 78px 0 0 76px;
}

.app[data-device="tsw"] .room-drawer {
  left: calc(50% + 38px);
  width: min(940px, calc(100vw - 100px));
  max-height: 72vh;
}

.app[data-device="tsw"] .room-drawer {
  top: 56%;
  bottom: auto;
  max-height: 76vh;
  border-bottom: 1px solid rgba(226, 189, 140, .48);
  border-radius: 22px;
}

.app[data-device="tsw"] .room-drawer-content {
  max-height: calc(72vh - 70px);
}

.app[data-device="tsw"] .drawer-scene-grid {
  grid-template-columns: repeat(3, 1fr);
}

.app[data-device="tsw"] .drawer-menu-grid {
  grid-template-columns: repeat(2, 1fr);
}

@keyframes climate-glow {
  50% { filter: drop-shadow(0 0 12px rgba(223, 129, 92, .22)); }
}

/* Lichtbedienung bleibt bewusst ruhig: keine laufenden oder erneut startenden Effekte. */
.room-drawer[data-panel="lights"],
.room-drawer[data-panel="controls"],
.room-drawer[data-panel="lights"] *,
.room-drawer[data-panel="controls"] *,
.mobile-light-card,
.mobile-light-card * {
  animation: none !important;
}

.room-drawer[data-panel="lights"] button,
.room-drawer[data-panel="controls"] button,
.mobile-light-card button {
  transition: none !important;
}

@media (max-width: 620px) {
  .app[data-device="mobile"] .thermostat-card {
    border-radius: 18px;
    background:
      radial-gradient(circle at 50% 8%, rgba(75, 116, 139, .16), transparent 48%),
      linear-gradient(160deg, rgba(14, 26, 33, .78), rgba(5, 11, 15, .9));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 22px 48px rgba(0, 0, 0, .28);
  }

  .app[data-device="mobile"] .cart-fab {
    display: grid;
    width: 100%;
    margin: 20px 0 6px;
    padding: 14px 18px;
  }

  .app[data-device="mobile"] .menu-grid {
    padding-bottom: 0;
  }

  .climate-gauge {
    height: 224px;
  }
}

/* Reliable touch choices for service requests on XPanel and TSW. */
.service-choice-field {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.service-choice-field legend {
  margin-bottom: 8px;
  color: #d5bd8d;
  font-size: 10px;
  letter-spacing: .08em;
}

.service-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.service-choice-grid.has-option-quantities {
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
}

.service-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

.service-choice-row > [data-service-choice] {
  min-width: 0;
}

.service-option-stepper {
  grid-template-columns: 52px minmax(64px, 1fr) 52px;
  min-height: 48px;
}

.service-option-stepper button {
  min-width: 52px;
  font-size: 22px;
}

.service-option-stepper output {
  min-width: 64px;
  font-size: 18px;
  line-height: 1;
}

.service-choice-grid.has-option-quantities .service-choice-row > [data-service-choice] span {
  min-height: 48px;
  padding-inline: 15px;
}

.service-choice-grid button {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  text-align: left;
}

.service-choice-grid span {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: #111c22;
  color: #dce3e2;
  font-size: 11px;
  cursor: pointer;
  transition: .18s;
}

.service-choice-grid button.active span,
.service-choice-grid button[aria-pressed="true"] span {
  border-color: var(--gold);
  background: rgba(212, 173, 103, .18);
  color: #f3dba9;
  box-shadow: inset 0 0 0 1px rgba(212, 173, 103, .18);
}

.service-choice-check {
  display: none;
  margin-left: auto;
  color: var(--gold2);
  line-height: 0;
}

.service-choice-grid button.active .service-choice-check,
.service-choice-grid button[aria-pressed="true"] .service-choice-check {
  display: grid;
  place-items: center;
}

.service-choice-check .ui-check-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-choice-field.invalid legend {
  color: #ffaaa4;
}

.service-choice-field.invalid .service-choice-grid {
  padding: 4px;
  border: 1px solid rgba(230, 91, 84, .72);
  border-radius: 10px;
}

.service-number-field {
  display: grid;
  gap: 7px;
}

.service-number-field > span {
  color: #d5bd8d;
  font-size: 10px;
  letter-spacing: .08em;
}

.service-stepper {
  display: grid;
  grid-template-columns: 52px minmax(72px, 1fr) 52px;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
  background: #111c22;
}

.service-stepper button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: rgba(212, 173, 103, .12);
  color: var(--gold2);
  line-height: 1;
  cursor: pointer;
}

.service-stepper .ui-step-icon {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
}

.service-stepper button:first-child { border-right: 1px solid rgba(255,255,255,.12); }
.service-stepper button:last-child { border-left: 1px solid rgba(255,255,255,.12); }
.service-stepper output { display: grid; place-items: center; color: #fff; font-size: 19px; font-weight: 700; }

.service-time-field {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.service-time-field legend {
  margin-bottom: 8px;
  color: #d5bd8d;
  font-size: 10px;
  letter-spacing: .08em;
}

.service-time-control {
  display: grid;
  grid-template-columns: 88px 72px minmax(120px, 1fr) 72px 88px auto;
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 9px;
  background: #111c22;
  overflow: hidden;
}

.service-time-control.no-clear {
  grid-template-columns: 88px 72px minmax(120px, 1fr) 72px 88px;
}

.service-time-control button {
  border: 0;
  border-right: 1px solid rgba(255,255,255,.1);
  background: rgba(212,173,103,.1);
  color: var(--gold2);
  font-weight: 700;
  cursor: pointer;
}

.service-time-control output {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: .08em;
}

.service-time-control .service-time-now {
  min-width: 86px;
  border-right: 0;
  border-left: 1px solid rgba(255,255,255,.1);
  background: rgba(92,181,132,.13);
  color: #a9dfc4;
}

.service-time-control .service-time-now.active {
  background: rgba(92,181,132,.28);
  box-shadow: inset 0 0 0 1px rgba(126,224,172,.55);
  color: #d9ffea;
}

/* Service requests are normal in-flow pages. This avoids the inconsistent
   fixed/top-layer behaviour of embedded panel browsers. */
.service-request-page {
  width: min(1320px, calc(100% - 56px));
  margin: 22px auto 42px;
  border: 1px solid rgba(212,173,103,.42);
  border-radius: 18px;
  background: rgba(6,14,18,.91);
  box-shadow: 0 28px 80px rgba(0,0,0,.42);
  overflow: hidden;
}

.service-request-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(15,27,33,.92);
}

.service-request-page-head h1 { margin: 5px 0 4px; font-size: clamp(34px, 3vw, 52px); }
.service-request-page-head p { margin: 0; color: #b9c2c3; }
.service-request-page-head > button {
  flex: 0 0 auto;
  min-width: 126px;
  min-height: 48px;
  border: 1px solid rgba(212,173,103,.55);
  border-radius: 9px;
  background: rgba(212,173,103,.12);
  color: var(--gold2);
  font-weight: 700;
  cursor: pointer;
}

.service-request-page-content {
  display: grid;
  grid-template-columns: minmax(280px, 36%) minmax(0, 64%);
  min-height: 0;
  padding: 22px 26px 26px;
}

.service-request-visual {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(212,173,103,.28);
  border-radius: 12px;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.service-request-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,11,15,.86), transparent 64%);
}

.service-request-visual span {
  position: absolute;
  z-index: 1;
  left: 20px;
  bottom: 18px;
  color: var(--gold2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .18em;
}

.service-request-form {
  min-width: 0;
  padding: 4px 0 0 22px;
}

.service-request-form > p {
  margin: 0 0 18px;
  color: #b9c2c3;
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .service-request-page { width: calc(100% - 28px); margin-top: 14px; }
  .service-request-page-head { align-items: flex-start; }
  .service-request-page-content { grid-template-columns: 1fr; padding: 16px; }
  .service-request-visual { min-height: 170px; }
  .service-request-form { padding: 18px 0 0; }
  .service-time-control { grid-template-columns: 68px 58px minmax(92px,1fr) 58px 68px auto; }
  .service-time-control.no-clear { grid-template-columns: 68px 58px minmax(92px,1fr) 58px 68px; }
}

/* One deterministic modal layer for browser previews and Crestron WebViews.
   Native <dialog> is deliberately avoided because panel engines differ in
   top-layer and pointer-event handling. */
.modal-backdrop {
  position: fixed;
  z-index: 58;
  inset: 0;
  background: rgba(2, 6, 8, .8);
  backdrop-filter: blur(9px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-surface[hidden] {
  display: none !important;
}

.modal-surface.modal-fallback-open {
  display: block;
  position: fixed;
  z-index: 60;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  margin: 0;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

@media (min-width: 900px) {
  .service-dialog {
    width: min(1120px, calc(100vw - 64px));
    max-height: calc(100dvh - 44px);
    grid-template-columns: minmax(330px, 38%) minmax(0, 62%);
    grid-template-rows: auto auto 1fr;
    overflow: hidden;
  }

  .service-dialog.modal-fallback-open {
    display: grid;
  }

  .service-dialog-visual {
    grid-column: 1;
    grid-row: 1 / 4;
    height: auto;
    min-height: 610px;
  }

  .service-dialog-visual::after {
    background: linear-gradient(90deg, transparent 38%, #0b1216 100%), linear-gradient(0deg, rgba(5, 11, 15, .7), transparent 58%);
  }

  .service-dialog-visual span {
    left: 24px;
    right: 24px;
    bottom: 24px;
  }

  .service-dialog > .dialog-head {
    grid-column: 2;
    margin: 20px 24px 8px;
    padding-bottom: 12px;
  }

  .service-dialog > .dialog-head h2 {
    margin: 5px 0 0;
    font-size: 29px;
  }

  .service-dialog-intro {
    grid-column: 2;
    margin: 0 24px 12px;
  }

  .service-dialog form {
    grid-column: 2;
    min-height: 0;
    padding: 0 24px 20px;
    overflow: auto;
  }

  .service-fields {
    gap: 9px 11px;
  }

  .service-fields input,
  .service-fields textarea {
    padding: 10px 11px;
  }

  .service-fields textarea {
    height: 68px;
  }

  .service-choice-field legend {
    margin-bottom: 6px;
  }

  .service-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .service-choice-grid span {
    min-height: 40px;
    padding: 8px 10px;
  }

  .service-form-actions {
    margin-top: 12px;
    padding-top: 12px;
  }
}

@media (max-width: 620px) {
  .service-dining-launcher,
  .service-dining-copy {
    min-height: 155px;
  }

  .service-dining-copy {
    padding: 20px;
  }

  .service-dining-copy b {
    font-size: 25px;
  }
}

/* Keep the yacht visible: compact climate controls sit at the lower left. */
.app[data-device="xpanel"] .desktop-climate {
  position: absolute;
  left: 38px;
  bottom: 34px;
  width: 720px;
  max-width: 720px;
  grid-template-columns: 360px 342px;
  align-items: end;
  gap: 14px;
}

.app[data-device="xpanel"] .desktop-climate > .mobile-option-card {
  align-self: end;
  width: 342px;
  min-height: 0;
  margin: 0;
  padding: 12px;
}

.app[data-device="xpanel"] .desktop-climate .mobile-option-card .second {
  margin-top: 11px;
}

.app[data-device="xpanel"] .desktop-climate .mobile-choice {
  gap: 5px;
  margin-top: 7px;
}

.app[data-device="xpanel"] .desktop-climate .mobile-choice button {
  min-height: 34px;
  padding: 6px;
}

.app[data-device="xpanel"][data-view="climate"] .backdrop {
  transform: none;
}

.room-detail-actions .dining-action {
  border-color: rgba(226, 189, 140, .62);
  background: rgba(196, 154, 103, .16);
  color: #f2d6a0;
}

@media (max-width: 620px) {
  .service-choice-grid {
    grid-template-columns: 1fr;
  }

  .service-choice-grid.has-option-quantities {
    grid-template-columns: 1fr;
  }

  .service-choice-row {
    grid-template-columns: minmax(0, 1fr) 148px;
    gap: 7px;
  }

  .service-option-stepper {
    grid-template-columns: 42px minmax(56px, 1fr) 42px;
  }

  .service-option-stepper button {
    min-width: 42px;
  }
}

/* XPanel home: place the live-status glass in the unused upper-right sea area. */
.app[data-device="xpanel"][data-view="home"] .overview-panel {
  position: relative;
  top: -34px;
  align-self: start;
  padding: 16px;
  border-radius: 22px;
  border-color: rgba(235, 226, 207, .22);
  background: rgba(6, 13, 17, .3);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

.app[data-device="xpanel"][data-view="home"] .overview-panel h2 {
  margin: 4px 0 12px;
  font-size: 20px;
}

.app[data-device="xpanel"][data-view="home"] .status-grid {
  gap: 8px;
}

.app[data-device="xpanel"][data-view="home"] .overview-panel .metric {
  min-height: 72px;
  padding: 10px 12px;
  background: rgba(5, 12, 16, .24);
}

.app[data-device="xpanel"][data-view="home"] .overview-panel .metric strong {
  margin-top: 7px;
  font-size: 17px;
}

.app[data-device="xpanel"][data-view="home"] .scene-strip {
  margin-top: 10px;
  padding-top: 10px;
}

.app[data-device="xpanel"][data-view="home"] .scene-strip header {
  margin-bottom: 7px;
}

.app[data-device="xpanel"][data-view="home"] .scene-chip {
  min-height: 46px;
  background: rgba(5, 12, 16, .2);
}

.app[data-device="xpanel"][data-view="home"] .scene-chip span {
  margin-bottom: 4px;
  font-size: 13px;
}

/* XPanel scenes: six light glass controls arranged in the free lower yacht area. */
.app[data-device="xpanel"][data-view="scenes"] #content {
  overflow: hidden;
}

.app[data-device="xpanel"][data-view="scenes"] .page-head {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.app[data-device="xpanel"][data-view="scenes"] .scene-grid {
  position: absolute;
  left: 52px;
  right: 120px;
  bottom: 32px;
  height: 300px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app[data-device="xpanel"][data-view="scenes"] .scene-grid button {
  height: auto;
  min-height: 0;
  padding: 18px 20px;
  border-color: rgba(235, 226, 207, .25);
  background: linear-gradient(145deg, rgba(5, 13, 18, .28), rgba(5, 13, 18, .10));
  -webkit-backdrop-filter: blur(1.5px) saturate(1.05);
  backdrop-filter: blur(1.5px) saturate(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .95);
}

.app[data-device="xpanel"][data-view="scenes"] .scene-grid button:hover {
  border-color: rgba(226, 189, 140, .55);
  background: rgba(10, 20, 26, .24);
}

.app[data-device="xpanel"][data-view="scenes"] .scene-grid button.active {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(170, 126, 70, .18), rgba(5, 13, 18, .09));
  box-shadow: inset 0 0 0 1px rgba(240, 211, 152, .38), 0 10px 28px rgba(0, 0, 0, .10);
}

.app[data-device="xpanel"][data-view="scenes"] .scene-grid b {
  margin-top: 28px;
}

/* The selected cabin opens as a full image room and keeps door access visible. */
.app[data-device="xpanel"] .room-detail-copy > .door-control,
.app[data-device="tsw"] .room-detail-copy > .door-control {
  max-width: 530px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(5, 13, 18, .42);
  border-color: rgba(235, 226, 207, .24);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.room-detail-copy > .door-control h2 {
  margin: 3px 0;
  font-size: 18px;
}

.room-detail-copy > .door-control p {
  font-size: 10px;
}

.room-detail-copy > .door-control .door-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
}

/* Requested safety colours: opening green, locking red. */
.door-control .unlock,
.door-actions .unlock {
  border-color: #70d39c;
  background: rgba(52, 132, 88, .22);
  color: #b9f4d2;
}

.door-control .lock {
  border-color: #db7474;
  background: rgba(151, 55, 55, .22);
  color: #ffc0c0;
}

/* TSW-880: dedicated, labelled touch navigation instead of desktop icon-only rail. */
.app[data-device="tsw"] .rail {
  width: 108px;
  padding: 16px 10px 14px;
  background: rgba(4, 10, 12, .88);
}

.app[data-device="tsw"] .brand {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
}

.app[data-device="tsw"] #nav {
  width: 100%;
  gap: 4px;
  margin: 18px 0 auto;
}

.app[data-device="tsw"] .nav-btn {
  width: 100%;
  min-height: 58px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  touch-action: manipulation;
}

.app[data-device="tsw"] .nav-btn svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.app[data-device="tsw"] .nav-btn small {
  display: block;
  max-width: 92px;
  color: inherit;
  font-size: 8px;
  line-height: 1.15;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
}

.app[data-device="tsw"] .nav-btn.active {
  border-color: rgba(226, 189, 140, .38);
  background: linear-gradient(100deg, rgba(196, 154, 103, .2), rgba(255, 255, 255, .035));
  color: #f6f0e6;
}

.app[data-device="tsw"] .nav-btn.active::before {
  left: -11px;
}

.app[data-device="tsw"] .profile {
  flex: 0 0 36px;
}

.app[data-device="tsw"] .topbar {
  left: 108px;
}

/* XPanel: room controls stay visible and named in the left rail on every page. */
.app[data-device="xpanel"] #nav {
  gap: 5px;
}

.app[data-device="xpanel"] .nav-btn {
  min-height: 61px;
  padding: 5px 2px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.app[data-device="xpanel"] .nav-btn svg {
  width: 21px;
  height: 21px;
}

.app[data-device="xpanel"] .nav-btn small {
  display: block;
  max-width: 78px;
  color: inherit;
  font-size: 7px;
  line-height: 1.12;
  letter-spacing: .055em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Translated labels may be longer; touch targets grow instead of clipping text. */
.service-form-actions button,
.door-control > button,
.door-actions button,
.service-time-control button,
.service-choice-grid span {
  height: auto;
  min-height: 44px;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: anywhere;
}

.service-form-actions button,
.door-control > button,
.door-actions button {
  padding: 10px 17px;
}

.app[data-device="tsw"] #content {
  left: 108px;
}

.app[data-device="tsw"] .room-drawer-backdrop {
  left: 108px;
}

.app[data-device="tsw"] .room-drawer {
  left: calc(50% + 54px);
  width: min(920px, calc(100vw - 132px));
}

/* TSW-880 visual parity with XPanel, proportionally fitted to 1280 × 800. */
.app[data-device="tsw"] .rail {
  width: 92px;
  padding: 18px 10px;
}

.app[data-device="tsw"] .brand {
  width: 56px;
  height: 56px;
  flex-basis: 56px;
}

.app[data-device="tsw"] #nav {
  gap: 5px;
  margin: auto 0;
}

.app[data-device="tsw"] .nav-btn {
  min-height: 61px;
  padding: 5px 2px;
  border-color: transparent;
  border-radius: 18px;
}

.app[data-device="tsw"] .nav-btn small {
  max-width: 78px;
  font-size: 7px;
  line-height: 1.12;
  letter-spacing: .055em;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app[data-device="tsw"] .nav-btn.active::before {
  left: -16px;
}

.app[data-device="tsw"] .topbar {
  left: 92px;
  height: 84px;
  padding: 18px 28px;
}

.app[data-device="tsw"] #content {
  inset: 84px 0 0 92px;
  padding: 20px 28px 28px;
}

.app[data-device="tsw"] .room-drawer-backdrop {
  inset: 84px 0 0 92px;
}

.app[data-device="tsw"] .room-drawer[data-panel="lights"],
.app[data-device="tsw"] .room-drawer[data-panel="controls"],
.app[data-device="tsw"] .room-drawer[data-panel="scenes"] {
  top: 245px;
  left: calc(50% + 46px);
  width: min(820px, calc(100vw - 128px));
  max-height: calc(100dvh - 265px);
  transform: translateX(-50%);
  background: rgba(8, 16, 20, .25);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  backdrop-filter: blur(10px) saturate(108%);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .18);
}

.app[data-device="tsw"] .room-drawer[data-panel="climate"] {
  /* Centre the climate card inside the usable TSW canvas (right of the
     92 px rail and below the 84 px top bar), independent of its height. */
  top: calc(50% + 42px);
  left: calc(50% + 46px);
  width: min(800px, calc(100vw - 150px));
  max-height: calc(100dvh - 116px);
  transform: translate(-50%, -50%);
  background: rgba(8, 16, 20, .25);
  -webkit-backdrop-filter: blur(10px) saturate(108%);
  backdrop-filter: blur(10px) saturate(108%);
  box-shadow: 0 20px 54px rgba(0, 0, 0, .18);
}

.app[data-device="tsw"] .room-drawer[data-panel="lights"] .room-drawer-content,
.app[data-device="tsw"] .room-drawer[data-panel="controls"] .room-drawer-content,
.app[data-device="tsw"] .room-drawer[data-panel="scenes"] .room-drawer-content,
.app[data-device="tsw"] .room-drawer[data-panel="climate"] .room-drawer-content {
  max-height: calc(100dvh - 285px);
  padding: 12px 18px 18px;
}

.app[data-device="tsw"] .room-drawer[data-panel="lights"] > header,
.app[data-device="tsw"] .room-drawer[data-panel="controls"] > header,
.app[data-device="tsw"] .room-drawer[data-panel="scenes"] > header,
.app[data-device="tsw"] .room-drawer[data-panel="climate"] > header {
  min-height: 64px;
  padding: 10px 16px 9px 20px;
}

.app[data-device="tsw"] .drawer-light-only .drawer-light-grid,
.app[data-device="tsw"] .drawer-scene-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.app[data-device="tsw"] .drawer-light-only .drawer-light-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.app[data-device="tsw"] .drawer-scene-grid button {
  min-width: 0;
  min-height: 112px;
  padding: 13px;
  overflow: hidden;
}

.app[data-device="tsw"] .drawer-scene-grid b {
  margin-top: 42px;
  max-width: 100%;
  font-size: 14px;
  line-height: 1.14;
  white-space: normal;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.app[data-device="tsw"] .room-drawer-climate {
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 14px;
}

.app[data-device="tsw"] .room-drawer-climate .climate-gauge {
  width: 260px;
  height: 178px;
}

.app[data-device="tsw"] .room-drawer-climate .climate-readout {
  top: 58px;
}

/* A TSW can report a scaled CSS viewport below the mobile breakpoint.
   Keep its native left rail and desktop canvas regardless of that value. */
html[data-device="tsw"],
html[data-device="tsw"] body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}

.app[data-device="tsw"] {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  display: block;
  isolation: isolate;
}

.app[data-device="tsw"] .rail {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  width: 92px !important;
  height: 100vh !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  overflow: hidden !important;
  background: rgba(4, 10, 12, .94) !important;
  z-index: 100 !important;
}

.app[data-device="tsw"] #nav {
  width: 100% !important;
  min-height: 0;
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column !important;
  justify-content: center;
  overflow: visible !important;
}

/* Labels are also visible in the static start menu before app.js takes over. */
.rail #nav .nav-btn small {
  display: block;
  max-width: 78px;
  color: inherit;
  font-size: 7px;
  line-height: 1.12;
  letter-spacing: .055em;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.app[data-device="tsw"] .topbar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: auto;
  width: auto;
}

.app[data-device="tsw"] #content {
  position: absolute;
  width: auto;
  min-height: 0;
  overflow: auto;
}

/* Climate contacts follow the finger: down = 1, release = 0. */
.climate-choice-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.climate-choice-grid .climate-choice {
  min-height: 58px;
  padding: 10px 14px;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .16s ease, background .16s ease, transform .08s ease;
}

.climate-choice-grid .climate-choice > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(240, 211, 152, .3);
  border-radius: 50%;
  color: var(--gold2);
  font-size: 16px;
}

.climate-choice-grid .climate-choice > b {
  min-width: 0;
  color: #e9ece8;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.climate-choice-grid .climate-shutdown {
  grid-column: 1 / -1;
  min-height: 52px;
  border-color: rgba(221, 111, 103, .42);
  background: linear-gradient(100deg, rgba(139, 48, 45, .2), rgba(255, 255, 255, .025));
}

.climate-choice-grid .climate-shutdown > span,
.climate-choice-grid .climate-shutdown > b {
  color: #ffc0ba;
}

.climate-choice-grid .climate-choice.pressed,
.thermostat-card .temp-stepper button.pressed {
  transform: translateY(1px) scale(.985);
  border-color: rgba(240, 211, 152, .9);
  background: rgba(212, 173, 103, .22);
  box-shadow: inset 0 0 0 1px rgba(240, 211, 152, .22);
}

.thermostat-card .temp-stepper button {
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.app[data-device="tsw"][data-view="home"] .overview-panel {
  position: relative;
  top: -20px;
  align-self: start;
  padding: 14px;
  border-radius: 22px;
  border-color: rgba(235, 226, 207, .22);
  background: rgba(6, 13, 17, .3);
  -webkit-backdrop-filter: blur(9px) saturate(1.05);
  backdrop-filter: blur(9px) saturate(1.05);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .16);
}

.app[data-device="tsw"][data-view="home"] .overview-panel .metric {
  min-height: 68px;
  padding: 9px 11px;
  background: rgba(5, 12, 16, .24);
}

.app[data-device="tsw"][data-view="home"] .scene-strip {
  margin-top: 9px;
  padding-top: 9px;
}

.app[data-device="tsw"][data-view="home"] .scene-chip {
  min-height: 44px;
  background: rgba(5, 12, 16, .2);
}

.app[data-device="tsw"][data-view="scenes"] #content {
  overflow: hidden;
}

.app[data-device="tsw"][data-view="scenes"] .page-head {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}

.app[data-device="tsw"][data-view="scenes"] .scene-grid {
  position: absolute;
  left: 28px;
  right: 48px;
  bottom: 24px;
  height: 230px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.app[data-device="tsw"][data-view="scenes"] .scene-grid button {
  height: auto;
  min-height: 0;
  padding: 14px 16px;
  border-color: rgba(235, 226, 207, .25);
  background: linear-gradient(145deg, rgba(5, 13, 18, .28), rgba(5, 13, 18, .10));
  -webkit-backdrop-filter: blur(1.5px) saturate(1.05);
  backdrop-filter: blur(1.5px) saturate(1.05);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .10);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .95);
}

.app[data-device="tsw"][data-view="scenes"] .scene-grid button.active {
  border-color: var(--gold);
  background: linear-gradient(145deg, rgba(170, 126, 70, .18), rgba(5, 13, 18, .09));
  box-shadow: inset 0 0 0 1px rgba(240, 211, 152, .38), 0 10px 28px rgba(0, 0, 0, .10);
}

.app[data-device="tsw"][data-view="scenes"] .scene-grid b {
  margin-top: 20px;
}
/* Font-independent line icons for browser captures and embedded panels. */
.nav-btn > span { display:grid; place-items:center; }
.nav-btn svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.line-icon { width:1.15em; height:1.15em; fill:none; stroke:currentColor; stroke-width:1.45; stroke-linecap:round; stroke-linejoin:round; vertical-align:middle; }
.css-caret { display:inline-block; width:0; height:0; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid currentColor; vertical-align:middle; }
.pause-icon { display:inline-block; width:12px; height:14px; border-left:3px solid currentColor; border-right:3px solid currentColor; vertical-align:-2px; }
