/* Apple HomeKit Style - iPad Gen 4 (iOS 10 WebKit Compatible) */

* {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #000000;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: fixed;
}

/* Master App Container */
.home-app {
  width: 100%;
  height: 100%;
  padding: 14px 22px;
  background: -webkit-radial-gradient(50% 0%, circle, #162032 0%, #0a0e17 60%, #03060a 100%);
  background: radial-gradient(circle at 50% 0%, #162032 0%, #0a0e17 60%, #03060a 100%);
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  overflow: hidden;
}

/* -------------------------------------------------------------
   TOP HEADER & STATUS BAR
   ------------------------------------------------------------- */
.home-header {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 8px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.header-left {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 1;
  flex: 1;
}

.header-meta-group {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.home-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.2;
}

.home-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.header-center {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
  -webkit-justify-content: center;
  justify-content: center;
}

.header-time-group {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: baseline;
  align-items: baseline;
}

.home-clock {
  font-size: 2.35rem;
  font-weight: 300;
  letter-spacing: -0.5px;
  line-height: 1;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

.home-ampm {
  font-size: 0.92rem;
  font-weight: 500;
  color: #8e8e93;
  margin-left: 6px;
  text-transform: uppercase;
}

.header-right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  -webkit-flex: 1;
  flex: 1;
}

.header-icon-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  margin-right: 12px;
  transition: all 0.2s;
}

.header-icon-btn:active {
  -webkit-transform: scale(0.92);
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.2);
}

.home-status-chip {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 20px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 500;
  color: #e5e5ea;
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
  background-color: #ff9f0a; /* Connecting default */
  box-shadow: 0 0 8px #ff9f0a;
  -webkit-transition: background-color 0.3s, box-shadow 0.3s;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.status-indicator-dot.connected {
  background-color: #30d158;
  box-shadow: 0 0 8px #30d158;
}

.status-indicator-dot.disconnected {
  background-color: #ff453a;
  box-shadow: 0 0 8px #ff453a;
}

.status-indicator-dot.esp32-dot {
  margin-right: 0;
  margin-left: 9px;
}

.settings-circle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  cursor: pointer;
}

/* -------------------------------------------------------------
   CAROUSEL VIEWPORT & TRACK (Hardware Accelerated for iOS 10)
   ------------------------------------------------------------- */
.carousel-viewport {
  position: relative;
  width: 100%;
  -webkit-flex: 1;
  flex: 1;
  overflow: hidden;
}

.carousel-track {
  display: -webkit-flex;
  display: flex;
  width: 500%;
  height: 100%;
  -webkit-transition: -webkit-transform 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition: transform 0.38s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

.carousel-page {
  width: 20%;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  padding: 0 4px 8px 4px;
}

/* -------------------------------------------------------------
   PAGE 1: SCENES & SECTIONS
   ------------------------------------------------------------- */
.scenes-section {
  margin-bottom: 14px;
}

.scenes-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -4px;
}

.scene-chip {
  width: calc(16.666% - 8px);
  margin: 4px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 26px 14px;
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  -webkit-transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scene-chip-icon {
  margin-right: 7px;
  font-size: 1.25rem;
  line-height: 1;
}

.scene-chip-title {
  font-size: 0.92rem;
  font-weight: 600;
}

.scene-chip:active,
.scene-chip.animating {
  -webkit-transform: scale(0.94);
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.22);
}

/* -------------------------------------------------------------
   PAGE 1: HOME NOW PLAYING MUSIC WIDGET
   ------------------------------------------------------------- */
.home-media-section {
  margin-top: 10px;
  margin-bottom: 6px;
}

.home-media-title-group {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.home-media-status-badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #8e8e93;
  margin-left: 10px;
}

.home-media-status-badge.playing {
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
}

.home-music-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 12px 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.home-music-card:active {
  -webkit-transform: scale(0.99);
  transform: scale(0.99);
  background: rgba(255, 255, 255, 0.12);
}

.home-music-card.muted {
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.08);
  box-shadow: 0 4px 18px rgba(255, 69, 58, 0.18);
}

.home-music-left {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
  margin-right: 14px;
}

.home-vinyl-wrap {
  margin-right: 12px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.home-vinyl {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: -webkit-radial-gradient(circle, #2c2c2e 0%, #1c1c1e 60%, #000000 100%);
  background: radial-gradient(circle, #2c2c2e 0%, #1c1c1e 60%, #000000 100%);
  border: 3px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.5);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.home-vinyl.spinning {
  -webkit-animation: spinVinyl 6s linear infinite;
  animation: spinVinyl 6s linear infinite;
}

.home-vinyl-center {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  overflow: hidden;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: #1c1c1e;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.7);
  font-size: 1.05rem;
}

.home-vinyl-icon {
  line-height: 1;
}

.home-music-details {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.home-track-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.home-track-artist {
  font-size: 0.82rem;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.home-track-album {
  font-size: 0.74rem;
  color: #636366;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.home-track-album:empty {
  display: none;
}

.home-music-meta-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.home-music-meta-row .media-card-mute-badge {
  margin-left: 10px;
  padding: 3px 7px;
  font-size: 0.68rem;
}

.home-music-middle {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-flex: 0 1 480px;
  flex: 0 1 480px;
  width: 480px;
  max-width: 500px;
  margin-right: 18px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}

.home-vol-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 0.78rem;
  cursor: pointer;
  margin: 0 3px;
  line-height: 1;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  -webkit-transition: background 0.15s ease;
  transition: background 0.15s ease;
}

.home-vol-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.home-slider-cont {
  -webkit-flex: 1;
  flex: 1;
  padding: 0 8px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  min-width: 0;
}

.home-vol-input {
  width: 100%;
  height: 6px;
}

.home-vol-input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
}

.home-vol-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #8e8e93;
  width: 38px;
  text-align: right;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  margin-left: 2px;
}

.home-music-right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.home-ctrl-btn {
  padding: 0;
  margin: 0 6px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  cursor: pointer;
  outline: none;
  -webkit-transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-ctrl-btn .media-svg-icon {
  width: 15px;
  height: 15px;
}

.home-ctrl-btn.home-primary-play-btn {
  width: 44px;
  height: 44px;
  background: -webkit-linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.45);
}

.home-ctrl-btn.home-primary-play-btn .media-svg-icon {
  width: 19px;
  height: 19px;
}

.home-ctrl-btn:active {
  -webkit-transform: scale(0.91);
  transform: scale(0.91);
}

@media (max-width: 680px) {
  .home-music-card {
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-align-items: stretch;
    align-items: stretch;
  }
  .home-music-left {
    margin-right: 0;
    margin-bottom: 10px;
  }
  .home-music-middle {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
    -webkit-justify-content: center;
    justify-content: center;
  }
  .home-music-right {
    width: 100%;
    -webkit-justify-content: center;
    justify-content: center;
  }
}

/* Subtle Kiosk Auto-Cycle Loop Toggle */
.autocycle-footer {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 4px;
}

.autocycle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #636366;
  padding: 4px 12px;
  border-radius: 14px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0.22;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  outline: none;
}

.autocycle-btn:hover,
.autocycle-btn:active {
  opacity: 0.65;
}

.autocycle-btn.active {
  opacity: 0.85;
  background: rgba(48, 209, 88, 0.08);
  border-color: rgba(48, 209, 88, 0.35);
  color: #30d158;
}

.autocycle-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #636366;
  margin-right: 6px;
  display: inline-block;
  -webkit-transition: all 0.3s ease;
  transition: all 0.3s ease;
}

.autocycle-btn.active .autocycle-dot {
  background: #30d158;
  box-shadow: 0 0 6px #30d158;
}

.home-section {
  margin-bottom: 14px;
}

.section-title-row {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: baseline;
  align-items: baseline;
  margin-bottom: 8px;
  padding: 0 2px;
}

.section-heading {
  font-size: 1.08rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.section-status-sub {
  font-size: 0.80rem;
  font-weight: 500;
  color: #8e8e93;
}

/* Accessories Grid (iOS 10 Flexbox) */
.homekit-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-left: -5px;
  margin-right: -5px;
}

.homekit-card {
  width: 33.333%;
  padding: 5px;
  box-sizing: border-box;
}

.card-inner {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  height: 108px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  cursor: pointer;
  -webkit-transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card-inner:active {
  -webkit-transform: scale(0.95);
  transform: scale(0.95);
}

.card-inner.is-on {
  background: -webkit-linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 245, 0.9) 100%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 240, 245, 0.9) 100%);
  color: #000000;
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.card-top {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
}

.device-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  font-size: 1.18rem;
}

.is-on .device-icon-wrap {
  background: rgba(0, 0, 0, 0.08);
}

.device-state-pill {
  font-size: 0.70rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #8e8e93;
}

.is-on .device-state-pill {
  background: #30d158;
  color: #ffffff;
}

.card-bottom {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
}

.device-name {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.2;
}

.device-sub {
  font-size: 0.76rem;
  color: #8e8e93;
  margin-top: 2px;
}

.is-on .device-sub {
  color: #3c3c43;
}

/* Workstations Grid */
.workstations-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-left: -5px;
  margin-right: -5px;
}

.workstation-card {
  width: 50%;
  padding: 5px;
  box-sizing: border-box;
}

.ws-inner {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.ws-top {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 10px;
}

.ws-icon {
  font-size: 1.4rem;
}

.ws-status-badge {
  font-size: 0.70rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  color: #8e8e93;
}

.ws-status-badge.online {
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.4);
}

.ws-status-badge.sleep {
  background: rgba(255, 159, 10, 0.2);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.4);
}

.ws-name {
  font-size: 1.02rem;
  font-weight: 600;
  color: #ffffff;
}

.ws-sub {
  font-size: 0.75rem;
  color: #8e8e93;
  margin-bottom: 10px;
}

.ws-action-bar {
  display: -webkit-flex;
  display: flex;
}

.ws-btn {
  -webkit-flex: 1;
  flex: 1;
  padding: 10px 8px;
  margin-right: 6px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ws-btn:last-child {
  margin-right: 0;
}

.ws-btn:active {
  -webkit-transform: scale(0.92);
  transform: scale(0.92);
}

.wake-btn:active, .wake-btn.animating {
  background: #30d158 !important;
  color: #000000 !important;
  box-shadow: 0 0 14px #30d158 !important;
}

.sleep-btn:active, .sleep-btn.animating {
  background: #ff9f0a !important;
  color: #000000 !important;
  box-shadow: 0 0 14px #ff9f0a !important;
}

.off-btn:active, .off-btn.animating {
  background: #ff453a !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px #ff453a !important;
}

/* -------------------------------------------------------------
   PAGE 2: BATTLE STATION HUD (TELEMETRY COCKPIT)
   ------------------------------------------------------------- */
.hud-container {
  padding: 4px 6px 14px 6px;
  max-width: 980px;
  margin: 0 auto;
}

.hud-target-bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.hud-live-tag {
  display: -webkit-inline-flex;
  display: inline-flex;
  -webkit-align-items: center;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #30d158;
  letter-spacing: 0.08em;
  background: rgba(48, 209, 88, 0.14);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid rgba(48, 209, 88, 0.3);
}

.hud-live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #30d158;
  margin-right: 7px;
  box-shadow: 0 0 8px #30d158;
  -webkit-animation: hudPulse 1.6s infinite ease-in-out;
  animation: hudPulse 1.6s infinite ease-in-out;
}

@-webkit-keyframes hudPulse {
  0% { -webkit-transform: scale(0.85); opacity: 0.6; }
  50% { -webkit-transform: scale(1.2); opacity: 1; }
  100% { -webkit-transform: scale(0.85); opacity: 0.6; }
}

@keyframes hudPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.85); opacity: 0.6; }
}

/* Station Identity Banner */
.hud-station-banner {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 9px 16px;
  margin-bottom: 12px;
}

.hud-station-left {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.hud-station-icon {
  font-size: 1.55rem;
  margin-right: 10px;
}

.hud-station-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #ffffff;
  margin-right: 12px;
}

.hud-station-ip {
  font-size: 0.80rem;
  color: #8e8e93;
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 8px;
  margin-left: 8px;
  font-family: monospace;
}

.hud-station-right {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  font-size: 0.80rem;
  color: #a1a1aa;
}

.hud-pill {
  background: rgba(255, 255, 255, 0.08);
  padding: 3px 9px;
  border-radius: 9px;
  margin-left: 8px;
  white-space: nowrap;
}

/* Circular SVG Gauges Row (5 Rings) */
.hud-rings-row {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin: 0 -4px 12px -4px;
}

.hud-ring-card {
  -webkit-flex: 1;
  flex: 1;
  margin: 0 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 10px 6px 8px 6px;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
}

.hud-ring-svg-wrap {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 4px;
}

.hud-ring-svg {
  width: 86px;
  height: 86px;
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}

.hud-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 7;
}

.hud-ring-fill {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  -webkit-transition: stroke-dashoffset 0.6s ease;
  transition: stroke-dashoffset 0.6s ease;
}

.ring-cpu { stroke: #0a84ff; }
.ring-ram { stroke: #af52de; }
.ring-gpu { stroke: #30d158; }
.ring-temp { stroke: #ff9f0a; }
.ring-storage { stroke: #64d2ff; }
.ring-bat { stroke: #30d158; }
.ring-warn { stroke: #ff453a !important; }

.hud-ring-center {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  pointer-events: none;
}

.hud-ring-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.hud-ring-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  color: #8e8e93;
  letter-spacing: 0.07em;
  margin-top: 3px;
  text-transform: uppercase;
}

.hud-ring-sub {
  font-size: 0.76rem;
  color: #d1d1d6;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.25;
}

/* Detailed Telemetry Cards Grid (2 Columns) */
.hud-cards-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.hud-detail-card {
  width: 50%;
  padding: 5px;
  box-sizing: border-box;
}

.hud-detail-inner {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 11px 14px;
  height: 100%;
  box-sizing: border-box;
}

.hud-card-title-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 6px;
}

.hud-card-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
}

.hud-card-sub-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: #8e8e93;
}

.hud-model-title {
  font-size: 0.86rem;
  font-weight: 600;
  color: #e5e5ea;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-spec-chips {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.hud-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  color: #d1d1d6;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-right: 5px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.hud-chip.blue {
  background: rgba(10, 132, 255, 0.18);
  color: #64d2ff;
  border-color: rgba(10, 132, 255, 0.35);
}

.hud-chip.green {
  background: rgba(48, 209, 88, 0.18);
  color: #30d158;
  border-color: rgba(48, 209, 88, 0.35);
}

.hud-stat-line {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 3px;
}

.hud-stat-lbl {
  color: #8e8e93;
}

.hud-stat-val {
  color: #ffffff;
  font-weight: 600;
}

.hud-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 3px;
  margin-bottom: 7px;
}

.hud-bar-fill {
  height: 100%;
  border-radius: 5px;
  background: -webkit-linear-gradient(left, #0a84ff, #30d158);
  background: linear-gradient(to right, #0a84ff, #30d158);
  -webkit-transition: width 0.4s ease;
  transition: width 0.4s ease;
}

.hud-bar-fill.purple {
  background: -webkit-linear-gradient(left, #af52de, #5e5ce6);
  background: linear-gradient(to right, #af52de, #5e5ce6);
}

.hud-bar-fill.cyan {
  background: -webkit-linear-gradient(left, #007aff, #64d2ff);
  background: linear-gradient(to right, #007aff, #64d2ff);
}

.hud-bar-fill.warning {
  background: -webkit-linear-gradient(left, #ff9f0a, #ff453a);
  background: linear-gradient(to right, #ff9f0a, #ff453a);
}

.hud-bar-multi {
  display: -webkit-flex;
  display: flex;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  overflow: hidden;
  margin-top: 3px;
  margin-bottom: 7px;
}

.hud-bar-seg {
  height: 100%;
  -webkit-transition: width 0.4s ease;
  transition: width 0.4s ease;
}

.hud-bar-seg.used { background: #af52de; }
.hud-bar-seg.cached { background: #5e5ce6; }
.hud-bar-seg.free { background: rgba(255, 255, 255, 0.12); }

/* -------------------------------------------------------------
   PAGE 3: MEDIA & AUDIO STUDIO
   ------------------------------------------------------------- */
.media-container {
  max-width: 620px;
  margin: 0 auto;
  padding: 4px;
}

.media-target-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.media-target-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #8e8e93;
}

.media-target-buttons {
  display: -webkit-flex;
  display: flex;
}

.media-tab-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  padding: 6px 14px;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.media-tab-btn.active {
  background: #0a84ff;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4);
}

.media-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  padding: 24px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  margin-top: 90px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  -webkit-transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.media-card:active {
  -webkit-transform: scale(0.985);
  transform: scale(0.985);
  background: rgba(255, 255, 255, 0.12);
}

.media-card.muted {
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.08);
  box-shadow: 0 8px 30px rgba(255, 69, 58, 0.18);
}

.media-card-right {
  margin-left: auto;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  padding-left: 14px;
}

.media-card-mute-badge {
  background: rgba(255, 69, 58, 0.25);
  border: 1px solid rgba(255, 69, 58, 0.5);
  color: #ff453a;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.media-vinyl-wrap {
  margin-right: 20px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.media-vinyl {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: -webkit-radial-gradient(circle, #2c2c2e 0%, #1c1c1e 60%, #000000 100%);
  background: radial-gradient(circle, #2c2c2e 0%, #1c1c1e 60%, #000000 100%);
  border: 4px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.vinyl-center {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  background: #1c1c1e;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
  font-size: 1.5rem;
}

.vinyl-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.media-vinyl.spinning {
  -webkit-animation: spinVinyl 6s linear infinite;
  animation: spinVinyl 6s linear infinite;
}

@-webkit-keyframes spinVinyl {
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes spinVinyl {
  100% { transform: rotate(360deg); }
}

.media-info {
  -webkit-flex: 1;
  flex: 1;
  min-width: 0;
}

.media-status-badge {
  display: -webkit-inline-flex;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #8e8e93;
  margin-bottom: 6px;
}

.media-status-badge.playing {
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
}

.media-track-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.media-track-artist {
  font-size: 0.95rem;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

/* Equalizer Bars Animation */
.equalizer-bars {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  height: 16px;
  opacity: 0;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
}

.equalizer-bars.active {
  opacity: 1;
}

.eq-bar {
  width: 4px;
  height: 100%;
  background: #30d158;
  margin-right: 3px;
  border-radius: 2px;
  -webkit-animation: eqBounce 1.2s infinite ease-in-out;
  animation: eqBounce 1.2s infinite ease-in-out;
}

.eq-bar:nth-child(2) { -webkit-animation-delay: 0.2s; animation-delay: 0.2s; }
.eq-bar:nth-child(3) { -webkit-animation-delay: 0.4s; animation-delay: 0.4s; }
.eq-bar:nth-child(4) { -webkit-animation-delay: 0.1s; animation-delay: 0.1s; }
.eq-bar:nth-child(5) { -webkit-animation-delay: 0.3s; animation-delay: 0.3s; }

@-webkit-keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

@keyframes eqBounce {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}

.media-controls-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin-bottom: 40px;
  margin-top: 140px;

}

.media-ctrl-btn {
  padding: 0;
  margin: 0 14px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  text-align: center;
  line-height: 1;
  cursor: pointer;
  outline: none;
  -webkit-transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.media-ctrl-btn.primary-play-btn {
  width: 74px;
  height: 74px;
  background: -webkit-linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(10, 132, 255, 0.45);
}

.media-ctrl-btn:active {
  -webkit-transform: scale(0.91);
  transform: scale(0.91);
}

.media-svg-icon {
  width: 22px;
  height: 22px;
  fill: #ffffff;
  display: block;
  margin: auto;
}

.primary-play-btn .media-svg-icon {
  width: 30px;
  height: 30px;
}

#media-play-icon,
#home-media-play-icon {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.volume-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 18px;
}

.volume-header {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 12px;
}

.volume-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.volume-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.volume-slider-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.vol-quick-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0 6px;
  white-space: nowrap;
}

.slider-container {
  -webkit-flex: 1;
  flex: 1;
  padding: 0 8px;
  touch-action: pan-x;
}

.volume-range-input {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.15);
  outline: none;
  touch-action: pan-x;
}

.volume-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

/* -------------------------------------------------------------
   PAGE 4: STREAM DECK & WORKSTATION ACTIONS
   ------------------------------------------------------------- */
.deck-container {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  padding: 4px 6px 14px 6px;
}

.deck-target-bar {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.06);
  padding: 7px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 12px;
}

.deck-target-status {
  font-size: 0.84rem;
  color: #30d158;
  font-weight: 600;
}

.deck-section {
  margin-bottom: 14px;
}

.compact-title {
  margin-bottom: 8px !important;
}

/* Quick Apps Deck Grid (4x2 Horizontal Tiles with Large Icons) */
.app-deck-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.app-tile {
  width: calc(25% - 10px);
  margin: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 12px 14px;
  color: #ffffff;
  cursor: pointer;
  -webkit-transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-sizing: border-box;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  text-align: left;
}

.app-tile:active {
  -webkit-transform: scale(0.94);
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.2);
}

.app-icon-wrap {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.08);
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  margin-right: 12px;
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
}

.app-tile-icon {
  font-size: 2.35rem;
  line-height: 1;
}

.app-brand-svg {
  width: 28px;
  height: 28px;
  display: block;
}

.app-tile-info {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  min-width: 0;
}

.app-tile-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-tile-desc {
  font-size: 0.74rem;
  color: #8e8e93;
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* App specific brand glows */
.app-whatsapp .app-icon-wrap { background: rgba(37, 211, 102, 0.18); border: 1px solid rgba(37, 211, 102, 0.4); }
.app-gemini .app-icon-wrap { background: rgba(138, 92, 246, 0.22); border: 1px solid rgba(138, 92, 246, 0.45); }
.app-claude .app-icon-wrap { background: rgba(217, 119, 6, 0.2); border: 1px solid rgba(217, 119, 6, 0.4); }
.app-youtube .app-icon-wrap { background: rgba(255, 0, 0, 0.18); border: 1px solid rgba(255, 0, 0, 0.4); }
.app-github .app-icon-wrap { background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.28); }
.app-chatgpt .app-icon-wrap { background: rgba(16, 163, 127, 0.2); border: 1px solid rgba(16, 163, 127, 0.4); }
.app-gmail .app-icon-wrap { background: rgba(234, 67, 53, 0.18); border: 1px solid rgba(234, 67, 53, 0.4); }
.app-spotify .app-icon-wrap { background: rgba(30, 215, 96, 0.18); border: 1px solid rgba(30, 215, 96, 0.4); }

/* System Macros (Single Row of 6) */
.deck-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin: -5px;
}

.deck-tile {
  width: calc(16.666% - 10px);
  margin: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: left;
  color: #ffffff;
  cursor: pointer;
  -webkit-transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  transition: all 0.2s cubic-bezier(0.25, 0.1, 0.25, 1);
  box-sizing: border-box;
}

.deck-tile:active {
  -webkit-transform: scale(0.93);
  transform: scale(0.93);
  background: rgba(255, 255, 255, 0.18);
}

.deck-tile-top {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 8px;
}

.deck-icon {
  font-size: 1.65rem;
}

.deck-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.12);
  color: #8e8e93;
}

.deck-badge.action {
  background: rgba(10, 132, 255, 0.2);
  color: #0a84ff;
  border: 1px solid rgba(10, 132, 255, 0.35);
}

.deck-badge.warning {
  background: rgba(255, 159, 10, 0.2);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.35);
}

/* Mic Tile Specific Live/Muted States */
.deck-tile.mic-live {
  background: rgba(48, 209, 88, 0.12);
  border-color: rgba(48, 209, 88, 0.4);
}
.deck-tile.mic-live .deck-badge {
  background: rgba(48, 209, 88, 0.25);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.5);
}

.deck-tile.mic-muted {
  background: rgba(255, 69, 58, 0.12);
  border-color: rgba(255, 69, 58, 0.4);
}
.deck-tile.mic-muted .deck-badge {
  background: rgba(255, 69, 58, 0.25);
  color: #ff453a;
  border: 1px solid rgba(255, 69, 58, 0.5);
}

.deck-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-sub {
  font-size: 0.72rem;
  color: #8e8e93;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Teleport Card (2-Column Horizontal Layout) */
.teleport-card.compact-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.teleport-grid-layout {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
}

.teleport-left-pane {
  -webkit-flex: 1;
  flex: 1;
  margin-right: 14px;
  display: -webkit-flex;
  display: flex;
}

.teleport-textarea.compact-textarea {
  width: 100%;
  height: 100%;
  min-height: 120px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.4;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  resize: none;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.teleport-textarea.compact-textarea:focus {
  outline: none;
  border-color: #0a84ff;
  box-shadow: 0 0 10px rgba(10, 132, 255, 0.4);
}

.teleport-right-pane {
  -webkit-flex: 1.35;
  flex: 1.35;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: space-between;
  justify-content: space-between;
}

.machine-teleport-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  padding: 5px 0;
}

.machine-row-label {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e5e5ea;
  white-space: nowrap;
}

.machine-row-buttons {
  display: -webkit-flex;
  display: flex;
}

.teleport-btn.machine-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 8px;
  margin-right: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 11px;
  cursor: pointer;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.teleport-btn.machine-btn.primary {
  background: #0a84ff;
  border-color: #0a84ff;
}

.teleport-btn.machine-btn:active {
  -webkit-transform: scale(0.93);
  transform: scale(0.93);
}

.teleport-actions-row.compact-actions {
  display: -webkit-flex;
  display: flex;
  margin-top: 8px;
}

.teleport-btn.sync-btn {
  -webkit-flex: 1.3;
  flex: 1.3;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  margin-right: 6px;
  background: -webkit-linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%);
  background: linear-gradient(135deg, #0a84ff 0%, #5e5ce6 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(94, 92, 230, 0.35);
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.teleport-btn.secondary {
  -webkit-flex: 1;
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
  margin-right: 6px;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.teleport-btn.clear {
  -webkit-flex: 0.7;
  flex: 0.7;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #8e8e93;
  cursor: pointer;
  margin-right: 0;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.teleport-btn.sync-btn:active,
.teleport-btn.secondary:active,
.teleport-btn.clear:active {
  -webkit-transform: scale(0.93);
  transform: scale(0.93);
}

/* Toast Notifications */
.dock-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  -webkit-transform: translateX(-50%) translateY(100px);
  transform: translateX(-50%) translateY(100px);
  background: rgba(30, 30, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  -webkit-transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dock-toast.show {
  -webkit-transform: translateX(-50%) translateY(0);
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* -------------------------------------------------------------
   PAGE 5: WEATHER & CLIMATE HUB
   ------------------------------------------------------------- */
.weather-container {
  max-width: 680px;
  margin: 0 auto;
  padding: 4px;
}

.weather-hero-card {
  background: -webkit-linear-gradient(135deg, rgba(32, 78, 140, 0.45) 0%, rgba(14, 38, 72, 0.3) 100%);
  background: linear-gradient(135deg, rgba(32, 78, 140, 0.45) 0%, rgba(14, 38, 72, 0.3) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 24px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  margin-bottom: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.weather-hero-left {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
}

.weather-icon-giant {
  font-size: 4rem;
  margin-right: 18px;
}

.weather-temp-wrap {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
  align-items: flex-start;
}

.weather-temp-number {
  font-size: 3.6rem;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -2px;
}

.weather-temp-unit {
  font-size: 1.4rem;
  font-weight: 500;
  color: #8e8e93;
  margin-top: 4px;
  margin-left: 2px;
}

.weather-hero-right {
  text-align: right;
}

.weather-condition-text {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.weather-feels-like {
  font-size: 0.92rem;
  color: #8e8e93;
  margin-bottom: 4px;
}

.weather-highlow {
  font-size: 0.88rem;
  color: #e5e5ea;
  margin-bottom: 8px;
}

.weather-location-chip {
  display: -webkit-inline-flex;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 10px;
  border-radius: 12px;
  color: #ffffff;
}

.weather-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #8e8e93;
  margin-bottom: 10px;
  padding: 0 4px;
}

.hourly-forecast-row {
  display: -webkit-flex;
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 20px;
  padding-bottom: 6px;
}

.forecast-item {
  -webkit-flex-shrink: 0;
  flex-shrink: 0;
  width: 78px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 12px 6px;
  text-align: center;
  margin-right: 10px;
}

.forecast-time {
  font-size: 0.75rem;
  color: #8e8e93;
  margin-bottom: 6px;
}

.forecast-icon {
  font-size: 1.6rem;
  margin-bottom: 6px;
}

.forecast-temp {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.weather-metrics-grid {
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
  margin-left: -6px;
  margin-right: -6px;
}

.weather-metric-tile {
  width: 50%;
  padding: 6px;
  box-sizing: border-box;
}

.weather-metric-tile > div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 14px;
}

.metric-top {
  font-size: 0.8rem;
  font-weight: 600;
  color: #8e8e93;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.metric-icon {
  margin-right: 4px;
}

.metric-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}

.metric-sub {
  font-size: 0.72rem;
  color: #8e8e93;
}

/* -------------------------------------------------------------
   PAGE 5: DESK POMODORO & FOCUS TIMER
   ------------------------------------------------------------- */
.timer-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 6px;
  text-align: center;
}

.timer-circle-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 10px auto 20px auto;
}

.timer-svg {
  width: 100%;
  height: 100%;
  -webkit-transform: rotate(-90deg);
  transform: rotate(-90deg);
}

.timer-svg-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 8;
}

.timer-svg-progress {
  fill: none;
  stroke: #0a84ff;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 628.3; /* 2 * PI * 100 */
  stroke-dashoffset: 0;
  -webkit-transition: stroke-dashoffset 0.4s ease;
  transition: stroke-dashoffset 0.4s ease;
}

.timer-display-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.timer-mode-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: #0a84ff;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.timer-digits {
  font-size: 3.4rem;
  font-weight: 300;
  letter-spacing: -1px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-status-hint {
  font-size: 0.78rem;
  color: #8e8e93;
  margin-top: 6px;
}

.timer-presets-row {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: center;
  justify-content: center;
  margin-bottom: 24px;
}

.timer-preset-chip {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e5e5ea;
  padding: 8px 14px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0 4px;
  -webkit-transition: all 0.2s;
  transition: all 0.2s;
}

.timer-preset-chip.active {
  background: rgba(10, 132, 255, 0.25);
  border-color: #0a84ff;
  color: #ffffff;
}

.timer-actions-row {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
}

.timer-btn {
  border: none;
  cursor: pointer;
  padding: 12px 24px;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 8px;
  -webkit-transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timer-btn:active {
  -webkit-transform: scale(0.92);
  transform: scale(0.92);
}

.timer-btn-primary {
  background: -webkit-linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  background: linear-gradient(135deg, #0a84ff 0%, #0066cc 100%);
  color: #ffffff;
  min-width: 120px;
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.4);
}

.timer-btn-reset {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.timer-btn-sound {
  background: rgba(255, 255, 255, 0.08);
  color: #8e8e93;
  font-size: 0.85rem;
}

/* -------------------------------------------------------------
   STANDBY NIGHT CLOCK OVERLAY (Apple Watch Style)
   ------------------------------------------------------------- */
.standby-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  z-index: 99999;
  display: none;
  opacity: 0;
  -webkit-transition: opacity 0.5s ease;
  transition: opacity 0.5s ease;
  cursor: pointer;
}

.standby-overlay.active {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  opacity: 1;
}

.standby-content {
  text-align: center;
}

.standby-clock {
  font-size: 5.5rem;
  font-weight: 200;
  color: #ff9f0a;
  letter-spacing: -2px;
  text-shadow: 0 0 30px rgba(255, 159, 10, 0.4);
  line-height: 1;
  margin-bottom: 12px;
}

.standby-date {
  font-size: 1.25rem;
  font-weight: 400;
  color: rgba(255, 159, 10, 0.65);
  margin-bottom: 0;
}

/* -------------------------------------------------------------
   MODALS & SETTINGS
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  -webkit-align-items: center;
  align-items: center;
  -webkit-justify-content: center;
  justify-content: center;
  z-index: 10000;
}

.modal-overlay.open {
  display: -webkit-flex;
  display: flex;
}

.modal-box {
  background: #1c1c1e;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 24px;
}

.modal-top {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: space-between;
  justify-content: space-between;
  -webkit-align-items: center;
  align-items: center;
  margin-bottom: 16px;
}

.modal-heading {
  font-size: 1.25rem;
  font-weight: 600;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #8e8e93;
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-fields {
  margin-bottom: 20px;
}

.field-item {
  margin-bottom: 12px;
}

.field-item label {
  display: block;
  font-size: 0.8rem;
  color: #8e8e93;
  margin-bottom: 4px;
}

.field-item input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
}

.modal-actions {
  display: -webkit-flex;
  display: flex;
  -webkit-justify-content: flex-end;
  justify-content: flex-end;
}

.btn-cancel {
  background: transparent;
  border: none;
  color: #8e8e93;
  padding: 10px 16px;
  margin-right: 8px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save {
  background: #0a84ff;
  border: none;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}
