.mobile-viewport {
  width: 100%;
  min-height: 100vh;
  background: var(--bg-canvas);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.mobile-viewport.is-bezel {
  align-items: center;
  padding: 52px 16px 20px;
}

.mobile-shell {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg-canvas);
  display: flex;
  flex-direction: column;
  position: relative;
}

.mobile-viewport.is-bezel .mobile-shell {
  width: 390px;
  height: min(820px, calc(100vh - 76px));
  min-height: 540px;
  border-radius: 34px;
  border: 6px solid #1c1e21;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.78), 0 0 0 1px rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.mobile-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 86px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-card {
  background: var(--bg-card);
  border-radius: var(--radius-mobile);
  padding: 18px;
  border: 1px solid transparent;
}

.mobile-card.is-alarm {
  border-color: var(--accent-alert);
  box-shadow: 0 0 20px rgba(255, 112, 67, 0.25);
}

/* ─── MOBILE HEADER CLOCK (mobile_remote.yaml) ─────────────────────── */
.mobile-clock-card {
  padding: 20px 20px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mobile-clock {
  font-size: 56px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -2px;
  line-height: 1;
}

.mobile-date {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 6px;
}

.mobile-header-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.mobile-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-btn);
  color: var(--text-secondary);
}

.mobile-badge.is-cyan {
  color: var(--accent-cyan);
}

.mobile-badge.is-warm {
  color: var(--accent-warm);
}

.mobile-badge.is-alert {
  background: rgba(255, 112, 67, 0.22);
  color: #ffd3c4;
}

/* ─── ALL LIGHTS HERO CARD (mobile_remote.yaml) ────────────────────── */
.mobile-all-lights {
  height: 204px;
  border-radius: var(--radius-mobile);
  padding: 16px;
  background-position: center bottom;
  background-size: cover;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease;
}

.mobile-all-lights::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(18, 20, 22, 0.76) 0%, rgba(18, 20, 22, 0.28) 52%, transparent 100%);
  pointer-events: none;
}

.mobile-all-lights > * {
  position: relative;
  z-index: 1;
}

.mobile-all-lights:active {
  transform: scale(0.985);
}

.mobile-icon-cell {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--bg-icon-cell);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.mobile-icon-cell img {
  width: 28px;
  height: 28px;
}

.mobile-all-lights-title {
  font-size: 20px;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.15;
}

.mobile-all-lights-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* ─── QUICK MODES & SENSOR ROWS ────────────────────────────────────── */
.mobile-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-mode-btn {
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: var(--bg-btn);
  color: var(--text-secondary);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
}

.mobile-mode-btn.is-active {
  background: rgba(56, 242, 233, 0.12);
  border-color: rgba(56, 242, 233, 0.35);
  color: #ffffff;
}

.mobile-mode-btn small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-subtle);
}

.mobile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.mobile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mobile-row span {
  color: rgba(255, 255, 255, 0.55);
}

.mobile-row strong {
  font-weight: 500;
}

/* ─── ROOM ACCORDIONS ──────────────────────────────────────────────── */
.mobile-room-card {
  background: var(--bg-card);
  border-radius: var(--radius-mobile);
  overflow: hidden;
  border: 1px solid transparent;
}

.mobile-room-card.is-alarm-pulse {
  border-color: var(--accent-alert);
  box-shadow: 0 0 18px rgba(255, 112, 67, 0.25);
}

.mobile-room-header {
  width: 100%;
  border: none;
  background: transparent;
  color: #ffffff;
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.mobile-room-title {
  font-size: 15px;
  font-weight: 500;
}

.mobile-room-meta {
  font-size: 11px;
  color: var(--text-subtle);
  margin-top: 2px;
}

.mobile-room-body {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-switch-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 13px;
  background: var(--bg-btn);
  color: var(--text-secondary);
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  cursor: pointer;
}

.mobile-switch-item.is-on {
  background: rgba(56, 242, 233, 0.13);
  border-color: rgba(56, 242, 233, 0.35);
  color: #ffffff;
}

.mobile-switch-item.is-pulse-warn {
  background: rgba(255, 112, 67, 0.25);
  border-color: var(--accent-alert);
}

.mobile-switch-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-subtle);
}

.mobile-switch-item.is-on .mobile-switch-pill {
  color: var(--accent-cyan);
}

.mobile-dimmer-box {
  background: var(--bg-btn);
  border-radius: 13px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-dimmer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.mobile-l2-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.mobile-l2-btn {
  flex: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--bg-btn);
  color: #ffffff;
  padding: 10px 12px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.mobile-select {
  background: #141618;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 9px 8px;
  font-size: 11px;
}

/* ─── MOBILE KOMBI TAB ─────────────────────────────────────────────── */
.mobile-climate-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ─── MOBILE BOTTOM NAV ────────────────────────────────────────────── */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: rgba(13, 15, 16, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
}

.mobile-viewport.is-bezel .mobile-bottom-nav {
  position: absolute;
  left: 0;
  transform: none;
  max-width: none;
}

.mobile-nav-item {
  border: none;
  background: transparent;
  color: var(--text-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 500;
  padding: 5px 4px;
  cursor: pointer;
  position: relative;
}

.mobile-nav-item.is-active {
  color: var(--accent-cyan);
}

.mobile-nav-dot {
  position: absolute;
  top: 4px;
  right: 26%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-alert);
}
