
.lh-app,
.lh-app * {
  box-sizing: border-box;
}

.lh-app {
  --lh-fresh: #8338ec;
  --lh-old: #ff006e;
  --lh-bg-start: #f5f1ff;
  --lh-bg-end: #e7e1f7;
  --lh-outline: #0b0b0f;
  --lh-panel-bg: rgba(255, 255, 255, 0.88);
  --lh-panel-border: rgba(17, 17, 24, 0.12);
  --lh-shadow: 0 24px 80px rgba(13, 13, 17, 0.16);
  position: relative;
  width: 100%;
  min-height: var(--lh-app-height, 100svh);
  background: linear-gradient(180deg, var(--lh-bg-start), var(--lh-bg-end));
  color: #111;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lh-root {
  position: relative;
  width: 100%;
  min-height: var(--lh-app-height, 100svh);
  display: flex;
  flex-direction: column;
}

.lh-header {
  position: relative;
  z-index: 30;
  padding: 16px 16px 6px;
  display: flex;
  justify-content: center;
}

.lh-brand {
  width: min(680px, calc(100% - 24px));
  display: flex;
  justify-content: center;
}

.lh-logo {
  width: min(560px, 82vw);
  max-width: 100%;
  height: auto;
  display: block;
}

.lh-title {
  display: none;
}

.lh-orb-row {
  width: min(760px, calc(100% - 40px));
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
}

.lh-orb-row--floating {
  position: absolute;
  left: 50%;
  top: 48px;
  transform: translate(-50%, -50%);
  z-index: 36;
  pointer-events: none;
}

.lh-orb-wrap {
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.lh-orb {
  width: clamp(84px, 10vw, 112px);
  height: clamp(84px, 10vw, 112px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px) saturate(120%);
  color: rgba(17, 17, 24, 0.68);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease, opacity 180ms ease, border-color 180ms ease, color 180ms ease;
  box-shadow: 0 12px 30px rgba(17, 17, 24, 0.06), inset 0 0 0 1px rgba(255,255,255,0.06);
  position: relative;
  opacity: 0.76;
  pointer-events: auto;
}

.lh-orb:hover,
.lh-orb:focus-visible {
  transform: translateY(-2px) scale(1.02);
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 38px rgba(17, 17, 24, 0.12), inset 0 0 0 1px rgba(255,255,255,0.18);
  color: #111;
  opacity: 1;
  outline: none;
}

.lh-orb svg {
  width: 34px;
  height: 34px;
}

.lh-stage-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 520px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 48px 16px 16px;
}

.lh-stage {
  position: relative;
  width: min(980px, 100%);
  min-height: 520px;
  height: calc(var(--lh-app-height, 100svh) - 154px);
  max-height: calc(var(--lh-app-height, 100svh) - 118px);
  border-radius: 32px;
}

.lh-svg,
.lh-measure-svg,
.lh-hit-layer,
.lh-emojis,
.lh-pop-layer,
.lh-ui-layer {
  position: absolute;
  inset: 0;
}

.lh-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.lh-measure-svg {
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.lh-hit-layer {
  z-index: 10;
  cursor: grab;
  touch-action: none;
}

.lh-hit-layer.is-creating {
  cursor: nwse-resize;
}

.lh-hit-layer.is-dragging {
  cursor: grabbing;
}

.lh-emojis,
.lh-pop-layer,
.lh-ui-layer {
  pointer-events: none;
  z-index: 7;
}

.lh-emoji {
  position: absolute;
  transform: translate(-50%, -50%);
  user-select: none;
  line-height: 1;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.16));
  will-change: left, top, font-size;
}

.lh-spawn-hint {
  position: absolute;
  left: var(--lh-spawn-x, 50%);
  top: var(--lh-spawn-y, 50%);
  bottom: auto;
  transform: translate(-50%, -50%);
  width: clamp(56px, 8vw, 76px);
  height: clamp(56px, 8vw, 76px);
  border-radius: 999px;
  border: 2px dashed rgba(17, 17, 24, 0.16);
  display: grid;
  place-items: center;
  color: rgba(17, 17, 24, 0.38);
  font-size: 14px;
  font-weight: 700;
  pointer-events: none;
  z-index: 6;
}

.lh-spawn-hint span {
  transform: translateY(-1px);
}

.lh-bubble-preview-label {
  position: absolute;
  left: var(--lh-spawn-x, 50%);
  top: calc(var(--lh-spawn-y, 50%) - 86px);
  bottom: auto;
  transform: translate(-50%, -50%);
  font-size: 13px;
  font-weight: 700;
  color: rgba(17, 17, 24, 0.65);
  pointer-events: none;
  z-index: 8;
}

.lh-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 13, 18, 0.24);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 45;
}

.lh-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lh-panel {
  position: absolute;
  top: 88px;
  width: min(780px, calc(100% - 24px));
  max-height: calc(100% - 104px);
  overflow: auto;
  padding: 18px 18px 20px;
  background: var(--lh-panel-bg);
  border: 1px solid var(--lh-panel-border);
  border-radius: 30px;
  box-shadow: var(--lh-shadow);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px) scale(0.88);
  transform-origin: var(--lh-panel-origin-x, 50%) var(--lh-panel-origin-y, 0%);
  transition: opacity 240ms ease, transform 260ms cubic-bezier(.18,.88,.24,1.18), border-radius 240ms ease;
}

.lh-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.lh-panel--left {
  left: 12px;
}

.lh-panel--center {
  left: 50%;
  transform: translateX(-50%) translateY(18px) scale(0.88);
}

.lh-panel--center.is-open {
  transform: translateX(-50%) translateY(0) scale(1);
}

.lh-panel--right {
  right: 12px;
}

.lh-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.lh-panel__title {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.lh-panel__subtitle {
  font-size: 14px;
  color: rgba(17, 17, 24, 0.68);
  margin-top: 6px;
}

.lh-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(17, 17, 24, 0.08);
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
}

.lh-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.lh-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.lh-field label,
.lh-field legend {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: rgba(17,17,24,0.72);
}

.lh-field input[type="text"],
.lh-field input[type="datetime-local"],
.lh-field textarea,
.lh-field select {
  width: 100%;
  border: 1px solid rgba(17, 17, 24, 0.12);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  background: rgba(255,255,255,0.72);
  color: #111;
}

.lh-field textarea {
  min-height: 120px;
  resize: vertical;
}

.lh-field input[type="color"] {
  width: 100%;
  height: 50px;
  border: 1px solid rgba(17, 17, 24, 0.12);
  border-radius: 16px;
  background: transparent;
  padding: 6px;
}

.lh-emoji-current {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.lh-emoji-current__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.lh-emoji-current__title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17,17,24,0.62);
}

.lh-emoji-current__sub {
  font-size: 13px;
  color: rgba(17,17,24,0.64);
}

.lh-emoji-quick {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.lh-emoji-trigger {
  width: 100%;
  border: 1px solid rgba(17, 17, 24, 0.12);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  color: #111;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  cursor: pointer;
  text-align: left;
}

.lh-emoji-trigger__value {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 30px;
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.14), rgba(255, 0, 110, 0.14));
}

.lh-emoji-trigger__label {
  font-weight: 700;
}

.lh-emoji-trigger__hint {
  font-size: 12px;
  font-weight: 700;
  color: rgba(17,17,24,0.55);
}

.lh-emoji-picker-shell {
  margin-top: 8px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(17,17,24,0.08);
  background: rgba(255,255,255,0.66);
}

.lh-emoji-search-row {
  margin-bottom: 10px;
}

.lh-emoji-search {
  width: 100%;
  border: 1px solid rgba(17,17,24,0.12);
  border-radius: 14px;
  padding: 11px 12px;
  font: inherit;
  background: rgba(255,255,255,0.8);
  color: #111;
}

.lh-emoji-picker {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  max-height: 332px;
  overflow: auto;
}

.lh-emoji-option {
  border: 0;
  border-radius: 14px;
  min-height: 42px;
  background: rgba(17,17,24,0.06);
  font-size: 24px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.lh-emoji-option--quick {
  min-height: 48px;
}

.lh-emoji-option:hover,
.lh-emoji-option:focus-visible {
  transform: translateY(-1px);
  background: rgba(17,17,24,0.1);
  outline: none;
}

.lh-emoji-option.is-selected {
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.18), rgba(255, 0, 110, 0.18));
  box-shadow: inset 0 0 0 2px rgba(17,17,24,0.1);
}

.lh-emoji-empty {
  padding: 12px 4px 2px;
  text-align: center;
  font-size: 13px;
  color: rgba(17,17,24,0.58);
}

.lh-range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lh-range-wrap input[type="range"] {
  flex: 1 1 auto;
}

.lh-range-value {
  min-width: 32px;
  font-weight: 800;
  text-align: center;
}

.lh-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.lh-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.lh-button:hover,
.lh-button:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.lh-button--primary {
  background: linear-gradient(135deg, var(--lh-fresh), var(--lh-old));
  color: #fff;
  box-shadow: 0 16px 34px rgba(131, 56, 236, 0.28);
}

.lh-button--ghost {
  background: rgba(17, 17, 24, 0.08);
  color: #111;
}

.lh-button--danger {
  background: rgba(255, 0, 110, 0.12);
  color: #7f0037;
}

.lh-history-list,
.lh-day-task-list {
  display: grid;
  gap: 12px;
}

.lh-history-item,
.lh-day-task-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.68);
  border: 1px solid rgba(17,17,24,0.08);
}

.lh-history-item__emoji,
.lh-day-task-item__emoji {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: linear-gradient(135deg, rgba(131, 56, 236, 0.16), rgba(255, 0, 110, 0.22));
}

.lh-history-item__title,
.lh-day-task-item__title {
  font-size: 18px;
  font-weight: 800;
}

.lh-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 4px;
  color: rgba(17,17,24,0.68);
  font-size: 13px;
}

.lh-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lh-empty {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.55);
  color: rgba(17,17,24,0.68);
}

.lh-calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lh-calendar-month {
  font-size: clamp(26px, 4.4vw, 54px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lh-icon-button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(17,17,24,0.08);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lh-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(17,17,24,0.2);
  overflow: hidden;
  border-radius: 20px;
  background: rgba(255,255,255,0.64);
}

.lh-calendar-head {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 8px;
  padding-inline: 2px;
}

.lh-calendar-head div {
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 4px;
}

.lh-day {
  position: relative;
  aspect-ratio: 1 / 0.9;
  border-right: 1px solid rgba(17,17,24,0.18);
  border-bottom: 1px solid rgba(17,17,24,0.18);
  background: rgba(255,255,255,0.36);
  padding: 8px 8px 10px;
  min-height: 108px;
  cursor: pointer;
  transition: background 160ms ease;
}

.lh-day:hover,
.lh-day:focus-visible {
  background: rgba(255,255,255,0.48);
  outline: none;
}

.lh-day:nth-child(7n) {
  border-right: 0;
}

.lh-day--last-row {
  border-bottom: 0;
}

.lh-day.is-outside {
  color: rgba(17,17,24,0.24);
}

.lh-day__number-wrap {
  position: relative;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lh-day__number-wrap.is-today {
  box-shadow: 0 10px 20px rgba(131, 56, 236, 0.12);
}

.lh-day__number {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.lh-day__marker-list {
  position: absolute;
  inset-inline: 8px;
  top: 44px;
  display: grid;
  gap: 6px;
  z-index: 3;
}

.lh-day__marker {
  border: 0;
  border-radius: 999px;
  background: var(--lh-old);
  min-height: 42px;
  padding: 7px 12px;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(255, 0, 110, 0.18);
}

.lh-day__marker--multi {
  font-size: 18px;
  padding: 8px 10px;
}

.lh-modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lh-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lh-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 18, 0.34);
}

.lh-modal__card {
  position: relative;
  width: min(580px, 100%);
  max-height: min(92svh, 880px);
  overflow: auto;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,17,24,0.12);
  border-radius: 28px;
  padding: 18px;
  box-shadow: 0 30px 90px rgba(10, 10, 17, 0.24);
}

.lh-modal__title {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 900;
  line-height: 1;
}

.lh-modal__sub {
  margin-top: 6px;
  font-size: 14px;
  color: rgba(17,17,24,0.68);
}

.lh-modal__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 16px;
}

.lh-modal__grid .lh-field--full {
  grid-column: 1 / -1;
}

.lh-inline-note {
  font-size: 12px;
  color: rgba(17,17,24,0.58);
}

.lh-toast {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(14px);
  background: rgba(17, 17, 24, 0.84);
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  transition: opacity 180ms ease, transform 180ms ease;
}

.lh-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lh-pop-burst {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.lh-pop-burst__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 3px solid currentColor;
  transform: translate(-50%, -50%);
}

.lh-pop-burst__emoji {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  line-height: 1;
}

@media (max-width: 900px) {
  .lh-stage-wrap {
    padding: 44px 8px 12px;
  }

  .lh-orb-row--floating {
    top: 44px;
  }

  .lh-stage {
    height: calc(var(--lh-app-height, 100svh) - 146px);
    max-height: calc(var(--lh-app-height, 100svh) - 106px);
  }

  .lh-panel {
    width: calc(100% - 16px);
    top: 82px;
    max-height: calc(100% - 94px);
  }

  .lh-settings-grid,
  .lh-modal__grid {
    grid-template-columns: 1fr;
  }

  .lh-emoji-quick {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lh-emoji-picker {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .lh-day {
    min-height: 84px;
    aspect-ratio: auto;
  }

  .lh-day__marker-list {
    top: 40px;
  }

  .lh-day__marker {
    min-height: 32px;
    font-size: 16px;
  }
}

@media (max-width: 640px) {
  .lh-header {
    padding-inline: 12px;
    padding-top: 14px;
  }

  .lh-brand {
    width: min(92vw, 520px);
  }

  .lh-logo {
    width: min(92vw, 420px);
  }

  .lh-orb-row {
    width: min(92vw, 640px);
  }

  .lh-orb {
    width: clamp(72px, 22vw, 92px);
    height: clamp(72px, 22vw, 92px);
  }

  .lh-orb svg {
    width: 30px;
    height: 30px;
  }

  .lh-stage {
    min-height: 440px;
    height: calc(var(--lh-app-height, 100svh) - 134px);
  }

  .lh-history-item,
  .lh-day-task-item {
    grid-template-columns: auto 1fr;
  }

  .lh-emoji-quick {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lh-emoji-picker {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .lh-row-actions {
    grid-column: 1 / -1;
  }

  .lh-day {
    padding: 6px;
    min-height: 72px;
  }

  .lh-day__marker-list {
    top: 36px;
    inset-inline: 6px;
  }

  .lh-calendar-month {
    font-size: clamp(22px, 9vw, 34px);
  }
}

/* Round 7: procedural lava task badges */
.lh-hit-layer {
  cursor: pointer;
}

.lh-spawn-hint {
  width: clamp(66px, 8.5vw, 86px);
  height: clamp(66px, 8.5vw, 86px);
  border: 1.5px dashed rgba(17, 17, 24, 0.18);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px) saturate(112%);
  box-shadow: 0 12px 28px rgba(17, 17, 24, 0.06);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.lh-task-badge {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 999px;
  isolation: isolate;
  will-change: left, top, width, height;
}

.lh-task-badge__glow,
.lh-task-badge__bubble,
.lh-task-badge__emoji {
  position: absolute;
}

.lh-task-badge__glow {
  inset: -18%;
  border-radius: inherit;
  background: var(--lh-badge-glow, rgba(131, 56, 236, 0.2));
  filter: blur(16px);
  opacity: 0.92;
}

.lh-task-badge__bubble {
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,0.96) 0%, var(--lh-badge-fill, rgba(255,255,255,0.78)) 48%, var(--lh-badge-fill, rgba(255,255,255,0.78)) 100%);
  border: 1.5px solid var(--lh-badge-accent, rgba(255,255,255,0.85));
  box-shadow:
    0 8px 18px var(--lh-badge-shadow, rgba(17,17,24,0.12)),
    inset 0 1px 0 rgba(255,255,255,0.65);
}

.lh-task-badge__emoji {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -54%);
  line-height: 1;
  user-select: none;
  filter: drop-shadow(0 2px 6px rgba(17,17,24,0.18));
}


/* Round 10: ambient glow + stronger pop */
.lh-app {
  --lh-surround-color: #000000;
  --lh-ambient-a-inner: rgba(131, 56, 236, 0.28);
  --lh-ambient-a-outer: rgba(58, 134, 255, 0.18);
  --lh-ambient-b-inner: rgba(255, 0, 110, 0.24);
  --lh-ambient-b-outer: rgba(255, 190, 11, 0.16);
  background: var(--lh-surround-color);
}

.lh-stage-wrap {
  isolation: isolate;
}

.lh-stage-wrap::before,
.lh-stage-wrap::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(84vw, 920px);
  height: min(96%, 1040px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.92;
  mix-blend-mode: screen;
}

.lh-stage-wrap::before {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 18%, var(--lh-ambient-a-inner) 38%, var(--lh-ambient-a-outer) 61%, rgba(0,0,0,0) 82%);
  filter: blur(72px);
  animation: lhAmbientPulseA 17s ease-in-out infinite alternate;
}

.lh-stage-wrap::after {
  background:
    radial-gradient(ellipse at 50% 48%, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 14%, var(--lh-ambient-b-inner) 41%, var(--lh-ambient-b-outer) 68%, rgba(0,0,0,0) 88%);
  filter: blur(96px);
  animation: lhAmbientPulseB 23s ease-in-out infinite alternate;
}

.lh-stage {
  z-index: 1;
}

@keyframes lhAmbientPulseA {
  0% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.78; }
  50% { transform: translate(-50%, -50%) scale(1.02); opacity: 0.96; }
  100% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.84; }
}

@keyframes lhAmbientPulseB {
  0% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.68; }
  50% { transform: translate(-50%, -50%) scale(0.98); opacity: 0.9; }
  100% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.76; }
}

.lh-pop-burst {
  width: 88px;
  height: 88px;
  isolation: isolate;
  filter: drop-shadow(0 0 14px rgba(255,255,255,0.28));
}

.lh-pop-burst__flash,
.lh-pop-burst__ring,
.lh-pop-burst__spark,
.lh-pop-burst__emoji {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.lh-pop-burst__flash {
  width: 42%;
  height: 42%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.85) 24%, currentColor 56%, rgba(255,255,255,0) 82%);
  filter: blur(3px);
  opacity: 0.96;
}

.lh-pop-burst__ring {
  border-radius: 999px;
  border: 3px solid currentColor;
  box-shadow: 0 0 18px currentColor, inset 0 0 10px rgba(255,255,255,0.42);
}

.lh-pop-burst__ring--inner {
  width: 34%;
  height: 34%;
  border-color: rgba(255,255,255,0.98);
}

.lh-pop-burst__ring--outer {
  width: 56%;
  height: 56%;
}

.lh-pop-burst__spark {
  width: 12%;
  height: 12%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,1) 0%, currentColor 56%, rgba(255,255,255,0) 80%);
  box-shadow: 0 0 12px currentColor;
}

.lh-pop-burst__emoji {
  filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 4px 10px rgba(17,17,24,0.26));
}


/* Round 11: simplified appearance + cached lava playback */
.lh-stage-wrap::before,
.lh-stage-wrap::after {
  content: none !important;
  display: none !important;
}

.lh-lava-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.lh-svg {
  z-index: 1;
}

.lh-app {
  --lh-emoji-font-family: inherit;
  background: var(--lh-surround-color, #000000);
}

.lh-app[data-lh-appearance-mode="night"] .lh-spawn-hint {
  border-color: rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.lh-app[data-lh-appearance-mode="night"] .lh-bubble-preview-label {
  color: rgba(255, 255, 255, 0.78);
}

.lh-app[data-lh-appearance-mode="day"] .lh-orb {
  border-color: rgba(17, 17, 24, 0.18);
  background: rgba(255, 255, 255, 0.45);
  color: rgba(17, 17, 24, 0.72);
  box-shadow: 0 12px 30px rgba(17, 17, 24, 0.08), inset 0 0 0 1px rgba(255,255,255,0.25);
}

.lh-app[data-lh-appearance-mode="day"] .lh-orb:hover,
.lh-app[data-lh-appearance-mode="day"] .lh-orb:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(17, 17, 24, 0.24);
  color: #111;
}

.lh-task-badge__emoji,
.lh-pop-burst__emoji,
.lh-emoji-trigger__value,
.lh-emoji-option,
.lh-emoji-current__title,
.lh-emoji-current__copy,
.lh-history-item__emoji,
.lh-day-task-item__emoji,
.lh-day__marker {
  font-family: var(--lh-emoji-font-family, inherit);
}

.lh-pop-burst {
  filter: drop-shadow(0 0 22px rgba(255,255,255,0.42));
}

.lh-pop-burst__flash {
  width: 48%;
  height: 48%;
  filter: blur(4px);
}

.lh-pop-burst__ring {
  border-width: 4px;
  box-shadow: 0 0 24px currentColor, inset 0 0 12px rgba(255,255,255,0.5);
}

.lh-pop-burst__ring--inner {
  width: 40%;
  height: 40%;
}

.lh-pop-burst__ring--outer {
  width: 66%;
  height: 66%;
}

.lh-pop-burst__spark {
  width: 13%;
  height: 13%;
  box-shadow: 0 0 18px currentColor;
}

.lh-pop-burst__emoji {
  filter: drop-shadow(0 0 16px currentColor) drop-shadow(0 5px 12px rgba(17,17,24,0.3));
}


/* Round 12: baked frame playback + native emoji input + clicked mode switch */
.lh-lava-canvas {
  image-rendering: auto;
  contain: strict;
}

.lh-mode-switch {
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lh-mode-switch__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 0;
  min-height: 48px;
  border-radius: 999px;
  padding: 4px;
  background: rgba(17, 17, 24, 0.08);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 24, 0.08);
}

.lh-mode-switch__label {
  position: relative;
  z-index: 2;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(17, 17, 24, 0.76);
}

.lh-mode-switch__thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 24px rgba(17, 17, 24, 0.12), inset 0 0 0 1px rgba(17,17,24,0.06);
  transition: transform 180ms ease;
}

.lh-mode-switch.is-night .lh-mode-switch__thumb {
  transform: translateX(100%);
}

.lh-native-emoji-input {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 24, 0.12);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px 12px;
  font-size: 28px;
  line-height: 1.2;
  text-align: center;
  font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji",sans-serif;
}

.lh-emoji-search-row--native {
  margin-bottom: 10px;
}

.lh-pop-burst {
  filter: drop-shadow(0 0 28px rgba(255,255,255,0.48));
}

.lh-pop-burst__flash {
  width: 56%;
  height: 56%;
  filter: blur(5px);
}

.lh-pop-burst__ring {
  border-width: 5px;
  box-shadow: 0 0 28px currentColor, inset 0 0 14px rgba(255,255,255,0.52);
}

.lh-pop-burst__ring--inner {
  width: 46%;
  height: 46%;
}

.lh-pop-burst__ring--outer {
  width: 74%;
  height: 74%;
}

/* Round 13: baked atlas playback stabilization */
.lh-lava-canvas {
  contain: paint;
  transform: translateZ(0);
  backface-visibility: hidden;
  image-rendering: auto;
}

/* Round 17 video playback layer */
.lh-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.lh-lava-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  background: transparent;
}

.lh-app[data-lh-video-playback="1"] .lh-lava-canvas {
  display: none !important;
}


/* Round 18 performance cleanup: flatter moving task badges */
.lh-task-badge {
  left: 0 !important;
  top: 0 !important;
  will-change: transform !important;
}

.lh-task-badge__glow {
  display: none !important;
}

.lh-task-badge__bubble {
  box-shadow: none !important;
}

.lh-task-badge__emoji {
  filter: none !important;
  text-shadow: none !important;
}
