/* Home — smart-home accessories */
.home-root { height: 100%; overflow-y: auto; background: #f2f2f5; color: #1c1c1e; padding: 16px 20px 24px; }

.home-header { margin-bottom: 12px; }
.home-title { font-size: 24px; font-weight: 800; }
.home-sub { font-size: 13px; color: #8a8a8e; margin-top: 2px; }

.home-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.home-tab {
  padding: 5px 13px; border-radius: 14px; font-size: 13px; font-weight: 500;
  background: rgba(0,0,0,0.06); color: #3a3a3c;
}
.home-tab:hover { background: rgba(0,0,0,0.1); }
.home-tab.active { background: var(--accent); color: #fff; }

.home-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.home-empty { grid-column: 1/-1; color: #8a8a8e; padding: 30px; text-align: center; }

.home-tile {
  background: #fff; border-radius: 16px; padding: 14px;
  min-height: 104px; display: flex; flex-direction: column; gap: 4px;
  cursor: default; box-shadow: 0 1px 3px rgba(0,0,0,0.07);
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.08s ease;
  position: relative; overflow: hidden;
}
.home-tile:active { transform: scale(0.98); }
.home-tile-top { display: flex; align-items: flex-start; justify-content: space-between; }
.home-ic { font-size: 26px; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1)); }
.home-bulb { width: 10px; height: 10px; border-radius: 50%; background: rgba(0,0,0,0.12); margin-top: 4px; }
.home-tile-name { font-size: 14px; font-weight: 600; margin-top: auto; }
.home-tile-state { font-size: 12px; color: #8a8a8e; }

/* ON state — warm glow like a lit accessory */
.home-tile.on {
  background: linear-gradient(160deg, #fff6da, #ffe7a8);
  box-shadow: 0 2px 10px rgba(255,196,0,0.28);
}
.home-tile.on .home-bulb { background: #ffcd29; box-shadow: 0 0 8px 2px rgba(255,205,41,0.7); }
.home-tile.on .home-tile-state { color: #b07a00; }

/* Lock specifics */
.home-tile.locked { background: linear-gradient(160deg, #e7f0ff, #cfe0ff); box-shadow: 0 2px 10px rgba(10,132,255,0.22); }
.home-tile.locked .home-bulb { background: #0a84ff; box-shadow: 0 0 8px 2px rgba(10,132,255,0.6); }
.home-tile.locked .home-tile-state { color: #0a5; }
.home-tile.locked .home-tile-state { color: #1257c8; }

/* Fan spin */
.home-tile.spinning .home-ic { animation: homeSpin 1.6s linear infinite; }
@keyframes homeSpin { to { transform: rotate(360deg); } }

/* Thermostat tile */
.home-thermo { grid-column: span 2; background: linear-gradient(160deg, #eaf3ff, #ffffff); }
.home-thermo::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 100% at 50% 120%, rgba(255,90,40,calc(var(--heat,0.4)*0.5)), transparent 60%);
  pointer-events: none;
}
.home-thermo-head { display: flex; align-items: center; gap: 8px; z-index: 1; }
.home-thermo-dial { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 6px 0; z-index: 1; }
.home-thermo-val { font-size: 40px; font-weight: 300; font-variant-numeric: tabular-nums; }
.home-deg { font-size: 22px; vertical-align: super; color: #8a8a8e; }
.home-thermo-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.06); color: #1c1c1e; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center;
}
.home-thermo-btn:hover { background: rgba(0,0,0,0.12); }
.home-thermo-mode { font-size: 12px; color: #8a8a8e; text-align: center; z-index: 1; }

@media (max-width: 460px) { .home-thermo { grid-column: 1 / -1; } }
