/* Home live demo, in the app's original demo style. */
.ld {
  --ld-accent: #8b45f0;
  --ld-accent-soft: #c597f1;
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  background: #0e0f14;
  color: #fff;
  text-align: left;
}
.ld button, .ld select { font-family: inherit; color: inherit; }
.ld-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 20% 15%, rgba(126, 63, 219, 0.14), transparent 45%), radial-gradient(circle at 80% 30%, rgba(197, 151, 241, 0.1), transparent 45%);
}

.ld-side { position: relative; display: grid; align-content: start; gap: 4px; padding: 12px; border-right: 1px solid rgba(255, 255, 255, 0.1); background: #0b0c10; }
.ld-tab {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px;
  border: 0; border-radius: 0.6rem; background: transparent; text-align: left; cursor: pointer;
  transition: background 150ms ease;
}
.ld-tab:hover { background: #10111a; }
.ld-tab.is-active { background: #151627; }
.ld-ico {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 0.6rem; background: rgba(255, 255, 255, 0.03); color: rgba(255, 255, 255, 0.55);
  transition: color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}
.ld-ico svg { width: 17px; height: 17px; }
.ld-tab.is-active .ld-ico { color: var(--ld-accent-soft); border-color: rgba(139, 69, 240, 0.45); box-shadow: 0 0 18px -6px rgba(139, 69, 240, 0.9); }
.ld-tab-text { display: grid; min-width: 0; }
.ld-tab-name { font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.85); }
.ld-tab-sub { font-size: 11.5px; color: rgba(255, 255, 255, 0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ld-tab.is-active .ld-tab-name { color: #fff; }

.ld-main { position: relative; display: flex; flex-direction: column; min-height: 560px; padding: 18px 18px 20px; }
.ld-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.ld-title { margin: 0; font-size: 17px; font-weight: 600; }
.ld-auto { display: none; align-items: center; gap: 6px; font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.ld-auto i { width: 6px; height: 6px; border-radius: 50%; background: var(--ld-accent-soft); animation: ld-pulse 1.6s infinite; }
.ld.is-auto .ld-auto { display: inline-flex; }

.ld-rows { display: grid; gap: 8px; }
.ld-rows.is-in > * { animation: ld-in 280ms ease-out both; }
.ld-rows.is-in > :nth-child(2) { animation-delay: 30ms; } .ld-rows.is-in > :nth-child(3) { animation-delay: 60ms; }
.ld-rows.is-in > :nth-child(4) { animation-delay: 90ms; } .ld-rows.is-in > :nth-child(5) { animation-delay: 120ms; }
.ld-rows.is-in > :nth-child(6) { animation-delay: 150ms; }

.ld-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 16px; border-radius: 0.6rem; background: rgba(20, 22, 33, 0.8); }
.ld-row.is-slider, .ld-row.is-stack { flex-direction: column; align-items: stretch; gap: 10px; }
.ld-row-label { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.ld-row-sub { margin-top: 2px; font-size: 12px; color: rgba(255, 255, 255, 0.4); }

/* ".ld .ld-check" so the off state's hidden tick beats ".ld button { color: inherit }". */
.ld .ld-check {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 0.45rem; background: #0b0c10; color: transparent; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.ld-check svg { width: 20px; height: 20px; }
.ld .ld-check[aria-checked="true"] { border-color: transparent; background: var(--ld-accent); color: #fff; box-shadow: 0 6px 18px -8px rgba(139, 69, 240, 0.9); }

.ld-slider { display: flex; align-items: center; gap: 14px; }
.ld-slider input { flex: 1; height: 18px; margin: 0; background: transparent; appearance: none; -webkit-appearance: none; cursor: pointer; }
.ld-slider input::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--ld-accent) var(--p), rgba(255, 255, 255, 0.12) var(--p)); }
.ld-slider input::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); }
.ld-slider input::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--ld-accent); }
.ld-slider input::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px rgba(139, 69, 240, 0.35); }
.ld-slider input::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: #fff; }
.ld-val { min-width: 52px; text-align: right; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; }

.ld-color {
  position: relative; flex: none; width: 42px; height: 26px; border: 2px solid rgba(255, 255, 255, 0.85); border-radius: 0.45rem;
  background: var(--c); box-shadow: 0 0 16px -4px var(--c); cursor: pointer;
}
.ld-color input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.ld-btn {
  flex: none; padding: 8px 14px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.04); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}
.ld-btn:hover { background: rgba(139, 69, 240, 0.18); border-color: rgba(139, 69, 240, 0.5); }
.ld-btn:active { transform: scale(0.97); }
.ld-presets { display: flex; flex-wrap: wrap; gap: 8px; }

.ld-select select {
  padding: 8px 32px 8px 12px; border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 0.55rem;
  background: #0b0c10 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23c597f1' stroke-width='2'/%3E%3C/svg%3E") right 10px center / 14px no-repeat;
  font-size: 13px; font-weight: 600; appearance: none; -webkit-appearance: none; cursor: pointer;
}

.ld-toast {
  position: absolute; left: 50%; bottom: 16px; padding: 7px 14px; transform: translate(-50%, 8px);
  border: 1px solid rgba(139, 69, 240, 0.5); border-radius: 999px; background: #151627; font-size: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity 160ms ease, transform 160ms ease;
}
.ld-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.ld :focus-visible { outline: 2px solid var(--ld-accent-soft); outline-offset: 2px; }

@keyframes ld-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ld-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

@media (max-width: 640px) {
  .ld { grid-template-columns: minmax(0, 1fr); }
  .ld-side { display: flex; gap: 6px; overflow-x: auto; padding: 10px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); scrollbar-width: none; }
  .ld-side::-webkit-scrollbar { display: none; }
  .ld-tab { flex: none; width: auto; padding: 7px 10px 7px 7px; }
  .ld-tab-sub { display: none; }
  .ld-main { min-height: 0; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .ld-rows.is-in > * { animation: none; }
}
