/* Sparsh Home: Lights screen (Stream D) */

/* ---------- rooms ---------- */
.l-room { margin-bottom: 8px; }
.l-room-head { display: flex; align-items: center; gap: 4px; margin: 18px 0 10px 4px; min-height: 44px; }
.l-room-title { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; }
.l-room-name { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-room-count { flex: none; font-size: 13px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.l-room-more {
  flex: none; width: 44px; height: 44px; border-radius: 22px; color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
}
.l-room-head .switch { margin: 0 2px 0 4px; }

/* ---------- tiles ---------- */
.ltile {
  position: relative; isolation: isolate; overflow: hidden; cursor: pointer;
  min-height: 96px; padding: 14px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid rgba(255, 255, 255, 0.04);
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
  min-width: 0; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: transform 160ms ease-out, opacity 260ms var(--curve), border-color 300ms var(--curve);
  --tint: #ffb46b;
}
.ltile::before, .ltile::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0;
  transition: opacity 320ms var(--curve);
}
.ltile::before { background: var(--tint); }
.ltile::after { background: radial-gradient(120px circle at 32px 32px, var(--tint), transparent 70%); }
.ltile.on { border-color: rgba(255, 255, 255, 0.1); }
.ltile.on::before { opacity: 0.17; }
.ltile.on::after { opacity: 0.3; }
.ltile.unreach { opacity: 0.5; }

.l-ico {
  width: 36px; height: 36px; border-radius: 18px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel-2); color: var(--text-faint);
  transition: background-color 300ms var(--curve), color 300ms var(--curve), box-shadow 300ms var(--curve);
}
.ltile.on .l-ico {
  background: var(--tint); color: rgba(14, 12, 8, 0.78);
  box-shadow: 0 0 22px color-mix(in srgb, var(--tint) 65%, transparent);
}
.l-more {
  position: absolute; top: 0; right: 0; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center; color: var(--text-faint);
  transition: color 160ms ease-out, transform 160ms ease-out;
}
.l-more:active { transform: scale(0.92); color: var(--text); }
.l-txt { min-width: 0; }
.l-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.l-state { font-size: 13px; color: var(--text-dim); margin-top: 1px; font-variant-numeric: tabular-nums; }

/* ---------- detail sheet ---------- */
.l-sheet { display: flex; flex-direction: column; align-items: center; gap: 24px; padding-top: 4px; }
.l-hint { font-size: 13px; color: var(--text-dim); text-align: center; }
.l-bright { display: flex; flex-direction: column; align-items: center; gap: 14px; transition: opacity 260ms var(--curve); }
.l-pct { font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.l-pct small { font-size: 20px; font-weight: 600; color: var(--text-dim); margin-left: 2px; }
.l-slider { background: var(--panel-2); border: 1px solid rgba(255, 255, 255, 0.04); touch-action: none; -webkit-user-select: none; user-select: none; }
.l-slider .fill {
  top: 0; height: 100%; background: #f4f4f6; will-change: transform;
  transition: opacity 260ms var(--curve), background-color 260ms var(--curve);
}
.l-bright.off .l-slider .fill { opacity: 0.4; }

.l-seg { width: 100%; max-width: 320px; }
.l-pane { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.l-pane[hidden], .l-sheet [hidden] { display: none !important; }

/* kelvin */
.l-kval { font-size: 15px; font-weight: 600; color: var(--text-dim); font-variant-numeric: tabular-nums; }
.l-kval-n { color: var(--text); }
.l-ktrack {
  position: relative; width: 100%; max-width: 340px; height: 44px; border-radius: 22px;
  touch-action: none; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.06);
}
.l-kthumb {
  position: absolute; top: 3px; left: 3px; width: 36px; height: 36px; border-radius: 18px;
  background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); will-change: transform; pointer-events: none;
}
.l-presets { display: flex; justify-content: space-between; width: 100%; max-width: 340px; }
.l-preset {
  display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 64px; min-height: 44px;
}
.l-dot {
  width: 44px; height: 44px; border-radius: 22px; border: 2px solid transparent; background-clip: padding-box;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: border-color 200ms var(--curve), box-shadow 200ms var(--curve);
}
.l-preset.sel .l-dot { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }
.l-pn { font-size: 12px; font-weight: 600; color: var(--text); }
.l-pk { font-size: 11px; color: var(--text-faint); margin-top: -2px; font-variant-numeric: tabular-nums; }

/* wheel */
.l-wheel { position: relative; width: 240px; max-width: 100%; aspect-ratio: 1; touch-action: none; }
.l-canvas { display: block; width: 100%; height: 100%; border-radius: 50%; touch-action: none; cursor: crosshair; }
.l-wthumb {
  position: absolute; top: 0; left: 0; width: 30px; height: 30px; border-radius: 15px;
  border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); pointer-events: none; will-change: transform;
}
.l-swatches { display: flex; justify-content: space-between; width: 100%; max-width: 340px; }
.l-swatch {
  width: 44px; height: 44px; border-radius: 22px; border: 2px solid transparent; background-clip: padding-box;
  transition: box-shadow 200ms var(--curve);
}
.l-swatch.sel { border-color: var(--bg); box-shadow: 0 0 0 2px var(--text); }

@media (prefers-reduced-motion: reduce) {
  .ltile, .ltile::before, .ltile::after, .l-ico, .l-bright, .l-slider .fill, .l-dot, .l-swatch, .l-more { transition: none !important; }
}
