:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: #eeeae2;
  --gold: #d7b552;
  --gold-soft: rgba(215, 181, 82, .14);
  --line: rgba(255, 255, 255, .105);
  --muted: #767d80;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
}

button,
input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.hotel-room {
  width: 100%;
  height: 100%;
  padding: clamp(22px, 2.45vw, 44px) clamp(28px, 3.8vw, 72px) clamp(24px, 3vw, 54px);
  background:
    radial-gradient(circle at 17% 16%, rgba(215, 181, 82, .055), transparent 27%),
    radial-gradient(circle at 85% 77%, rgba(85, 121, 130, .04), transparent 24%),
    #000;
}

.room-topline {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(215, 181, 82, .25);
  color: rgba(215, 181, 82, .82);
  font-size: clamp(9px, .67vw, 13px);
  font-weight: 600;
  letter-spacing: .2em;
}

.room-topline > div,
.topline-right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.5vw, 28px);
}

.connection {
  color: #687174;
  font-size: .88em;
  letter-spacing: .15em;
}

.connection i {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border-radius: 50%;
  background: #6ca58d;
  box-shadow: 0 0 9px rgba(108, 165, 141, .85);
  vertical-align: 1px;
}

.topline-right > span:first-child { color: #666d70; }

.scene-badge {
  padding: 5px 10px;
  border: 1px solid rgba(215, 181, 82, .28);
  border-radius: 999px;
  background: rgba(215, 181, 82, .07);
  color: #d7b552;
  letter-spacing: .16em;
}

.close-screen {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0 0 2px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .025);
  color: #8e9292;
  font-size: 20px;
  font-weight: 200;
  cursor: pointer;
}

.close-screen:hover,
.close-screen:focus-visible {
  border-color: rgba(215, 181, 82, .55);
  color: #d7b552;
  outline: none;
}

.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(365px, .8fr);
  gap: clamp(28px, 3.4vw, 66px);
  height: calc(100% - 28px);
  padding-top: clamp(24px, 2.55vw, 46px);
}

.visual-column,
.control-column {
  min-width: 0;
  min-height: 0;
}

.visual-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(13px, 1.35vw, 24px);
}

.visual-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.visual-heading > div:first-child > span,
.control-title span,
.section-label span {
  color: #b69a49;
  font-size: clamp(9px, .67vw, 12px);
  font-weight: 650;
  letter-spacing: .2em;
}

.visual-heading h1 {
  margin: 5px 0 0;
  color: #e9e6df;
  font-size: clamp(28px, 2.7vw, 50px);
  font-weight: 280;
  letter-spacing: -.045em;
  line-height: 1;
}

.visual-heading h1 em {
  color: #d7b552;
  font-style: normal;
  font-weight: 320;
}

.environment-summary {
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 2.2vw, 38px);
  padding-bottom: 2px;
}

.environment-summary div { text-align: right; }

.environment-summary b {
  display: block;
  color: #dbd8d1;
  font-size: clamp(14px, 1.18vw, 21px);
  font-weight: 360;
  white-space: nowrap;
}

.environment-summary small {
  display: block;
  margin-top: 3px;
  color: #60676a;
  font-size: clamp(7px, .49vw, 9px);
  font-weight: 600;
  letter-spacing: .17em;
  white-space: nowrap;
}

.room-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(215, 181, 82, .19);
  background: #070808;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .025);
  --ceiling-level: .58;
  --ambient-level: .46;
  --ambient-color: #d7b552;
  --night-level: 0;
}

.room-stage::before {
  position: absolute;
  z-index: 4;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .018);
  content: "";
  pointer-events: none;
}

.ceiling-wash,
.ambient-wash,
.night-wash {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  transition: opacity .75s ease, background .75s ease;
}

.ceiling-wash {
  background: radial-gradient(ellipse at 50% 2%, rgba(255, 225, 166, .54), transparent 58%);
  opacity: var(--ceiling-level);
  mix-blend-mode: screen;
}

.ambient-wash {
  background: radial-gradient(ellipse at 44% 69%, var(--ambient-color), transparent 50%);
  opacity: calc(var(--ambient-level) * .34);
  mix-blend-mode: screen;
}

.night-wash {
  background: linear-gradient(0deg, rgba(215, 181, 82, .4), transparent 20%);
  opacity: var(--night-level);
  mix-blend-mode: screen;
}

.room-illustration {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
}

#ambient-line,
.lamp-glow,
#desk-light,
#night-path,
#climate-air,
#tv-wave,
#tv-source,
#tv-channel,
#privacy-glass,
#sheer-panel,
#curtain-left,
#curtain-right {
  transition: opacity .65s ease, fill .65s ease, x .75s cubic-bezier(.22,.85,.24,1), width .75s cubic-bezier(.22,.85,.24,1);
}

#climate-air path { animation: airflow 1.9s linear infinite; }

@keyframes airflow {
  to { stroke-dashoffset: -40; }
}

#tv-wave.is-on {
  opacity: .46;
  animation: tv-drift 7s ease-in-out infinite alternate;
}

@keyframes tv-drift {
  from { transform: translateY(0); }
  to { transform: translateY(-12px); }
}

.room-float {
  position: absolute;
  z-index: 6;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(4, 5, 5, .78);
  backdrop-filter: blur(8px);
}

.room-float-left { left: 15px; }
.room-float-right { right: 15px; text-align: right; }

.room-float span {
  color: #c8c5bd;
  font-size: clamp(8px, .55vw, 11px);
  font-weight: 600;
  letter-spacing: .13em;
}

.room-float small {
  margin-top: 3px;
  color: #656c6f;
  font-size: clamp(7px, .47vw, 9px);
  letter-spacing: .12em;
}

.room-alert {
  position: absolute;
  z-index: 8;
  top: 16px;
  left: 50%;
  min-width: 44%;
  padding: 10px 16px;
  border: 1px solid rgba(224, 88, 70, .55);
  background: rgba(75, 20, 14, .88);
  color: #ffc8bd;
  font-size: clamp(9px, .6vw, 11px);
  font-weight: 650;
  letter-spacing: .13em;
  text-align: center;
  transform: translateX(-50%);
}

.room-alert.warning {
  border-color: rgba(215, 181, 82, .55);
  background: rgba(63, 48, 13, .88);
  color: #f2d781;
}

.scene-strip {
  display: flex;
  align-items: center;
  gap: clamp(7px, .72vw, 13px);
  min-width: 0;
}

.scene-strip > span {
  margin-right: 5px;
  color: #686f71;
  font-size: clamp(8px, .53vw, 10px);
  font-weight: 650;
  letter-spacing: .18em;
}

.scene-strip button {
  min-width: 0;
  padding: 7px clamp(9px, .82vw, 15px);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .02);
  color: #747b7d;
  font-size: clamp(8px, .56vw, 11px);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: color .25s, border-color .25s, background .25s;
}

.scene-strip button:hover,
.scene-strip button:focus-visible,
.scene-strip button.is-active {
  border-color: rgba(215, 181, 82, .48);
  background: rgba(215, 181, 82, .1);
  color: #dfc66e;
  outline: none;
}

.control-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1.55fr) minmax(0, .82fr) auto;
  gap: clamp(12px, 1.25vw, 22px);
}

.control-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.control-title h2 {
  margin: 5px 0 0;
  color: #e7e4dc;
  font-size: clamp(19px, 1.55vw, 29px);
  font-weight: 300;
  letter-spacing: -.035em;
  line-height: 1;
}

.control-title > b {
  padding-bottom: 2px;
  color: #5d6467;
  font-size: clamp(8px, .53vw, 10px);
  font-weight: 600;
  letter-spacing: .14em;
  white-space: nowrap;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: clamp(9px, .9vw, 15px);
  min-height: 0;
}

.control-card,
.feature-panel,
.telemetry-panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(25, 25, 23, .88), rgba(9, 10, 10, .94));
}

.control-card {
  display: flex;
  min-height: 0;
  padding: clamp(12px, 1.15vw, 20px);
  flex-direction: column;
  transition: border-color .35s ease, background .35s ease;
}

.control-card.is-on {
  border-color: rgba(215, 181, 82, .31);
  background: linear-gradient(150deg, rgba(44, 37, 20, .64), rgba(10, 10, 9, .96));
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #747b7d;
  font-size: clamp(8px, .55vw, 10px);
  font-weight: 650;
  letter-spacing: .17em;
}

.card-head > b {
  color: #d2c7a5;
  font-size: 1.15em;
  font-weight: 500;
}

.power-toggle {
  width: 27px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: #0b0c0c;
  color: #555b5d;
  font-size: 16px;
  line-height: 10px;
  cursor: pointer;
}

.is-on .power-toggle,
.power-toggle.is-on {
  border-color: rgba(215, 181, 82, .65);
  background: rgba(215, 181, 82, .14);
  color: #d7b552;
}

.control-card > strong,
.temperature-control strong {
  margin: auto 0 2px;
  color: #e5e1d8;
  font-size: clamp(20px, 1.55vw, 29px);
  font-weight: 330;
  letter-spacing: -.035em;
}

.control-card > small,
.temperature-control + small {
  overflow: hidden;
  color: #656c6f;
  font-size: clamp(7px, .49vw, 9px);
  font-weight: 550;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

input[type="range"] {
  width: 100%;
  height: 2px;
  margin: clamp(10px, 1vw, 16px) 0 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #b8993e var(--range-fill, 50%), #313435 var(--range-fill, 50%));
  outline: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  width: 10px;
  height: 10px;
  border: 1px solid #e5cd81;
  border-radius: 50%;
  background: #c7a94d;
  box-shadow: 0 0 0 4px rgba(215, 181, 82, .09);
  cursor: pointer;
  appearance: none;
}

.temperature-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  margin: auto 0 2px;
}

.temperature-control strong { margin: 0; }

.temperature-control button {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 50%;
  background: rgba(255, 255, 255, .02);
  color: #858b8c;
  cursor: pointer;
}

.wide-card label {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.wide-card label span {
  color: #656c6f;
  font-size: clamp(7px, .47vw, 9px);
  font-weight: 550;
  letter-spacing: .1em;
}

.wide-card label input { margin: 9px 0; }

.media-actions {
  display: flex;
  gap: 6px;
  margin-top: clamp(8px, .8vw, 13px);
}

.media-actions button {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid rgba(255, 255, 255, .09);
  background: rgba(255, 255, 255, .018);
  color: #646b6e;
  font-size: clamp(7px, .43vw, 8px);
  font-weight: 650;
  letter-spacing: .1em;
  cursor: pointer;
}

.media-actions button.is-on {
  border-color: rgba(215, 181, 82, .4);
  color: #d7b552;
}

.feature-panel {
  min-height: 0;
  padding: clamp(11px, 1.08vw, 18px);
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(8px, .75vw, 12px);
}

.section-label small {
  color: #4f5557;
  font-size: clamp(6px, .42vw, 8px);
  font-weight: 650;
  letter-spacing: .12em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, .5vw, 8px);
}

.feature-grid button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  padding: clamp(7px, .66vw, 11px) 7px;
  border: 1px solid rgba(255, 255, 255, .07);
  background: rgba(255, 255, 255, .015);
  color: #656b6d;
  cursor: pointer;
}

.feature-grid button i {
  color: #7f8585;
  font-size: clamp(11px, .8vw, 15px);
  font-style: normal;
}

.feature-grid button span {
  overflow: hidden;
  font-size: clamp(6px, .42vw, 8px);
  font-weight: 650;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-grid button.is-on {
  border-color: rgba(215, 181, 82, .38);
  background: rgba(215, 181, 82, .09);
  color: #d8c170;
}

.feature-grid button.is-on i { color: #d7b552; }

.telemetry-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, .63fr)) minmax(0, 1.5fr);
  min-height: 58px;
}

.telemetry-panel > div {
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 9px 10px;
  border-right: 1px solid rgba(255, 255, 255, .075);
  flex-direction: column;
}

.telemetry-panel > div:last-child { border-right: 0; }

.telemetry-panel span {
  color: #5c6365;
  font-size: clamp(6px, .42vw, 8px);
  font-weight: 650;
  letter-spacing: .13em;
}

.telemetry-panel b {
  color: #d2cfc7;
  font-size: clamp(13px, 1vw, 18px);
  font-weight: 350;
}

.telemetry-panel small {
  color: #5e6567;
  font-size: clamp(6px, .42vw, 8px);
}

.security-state b {
  overflow: hidden;
  color: #79a990;
  font-size: clamp(9px, .67vw, 12px);
  font-weight: 600;
  letter-spacing: .1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-state.is-alert b { color: #e27766; }

@media (max-aspect-ratio: 4/3) {
  .hotel-room { padding: 24px 28px 30px; }
  .room-layout { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1.05fr) minmax(0, .95fr); gap: 20px; }
  .visual-heading h1 { font-size: clamp(28px, 4vw, 44px); }
  .control-column { grid-template-rows: auto minmax(0, 1fr) auto; }
  .feature-panel { display: none; }
  .environment-summary div:nth-child(3) { display: none; }
  .scene-strip { overflow: hidden; }
}

@media (max-height: 720px) {
  .hotel-room { padding-top: 18px; padding-bottom: 20px; }
  .room-layout { padding-top: 20px; }
  .visual-heading h1 { font-size: 30px; }
  .room-float { bottom: 8px; padding: 6px 8px; }
  .feature-grid button { padding-top: 6px; padding-bottom: 6px; }
}
