/**
 * Love launcher — peaceful rebrand of the cannon sample (id stays `cannon`).
 */

#cannonOverlay {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  overflow: hidden;
  pointer-events: none;
}

#cannonOverlay.is-active {
  display: block;
}

#cannonSvg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.cannon-hud {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 76px;
  width: fit-content;
  max-width: calc(100% - 86px);
  padding: 7px 12px;
  border-radius: 12px;
  background: rgba(36, 18, 32, 0.78);
  color: #fdeef5;
  font: 12px/1.4 "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0.01em;
  pointer-events: none;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 1;
  border: 1px solid rgba(255, 182, 210, 0.22);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.cannon-hud.is-geo-cta {
  pointer-events: auto;
  padding: 0;
  background: transparent;
}

.cannon-geo-btn {
  display: block;
  margin: 0;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 182, 210, 0.45);
  background: rgba(40, 20, 35, 0.88);
  color: #fdeef5;
  font: 12px/1.35 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  text-align: left;
  max-width: min(280px, calc(100vw - 96px));
  -webkit-tap-highlight-color: transparent;
}

.cannon-geo-btn:active {
  transform: scale(0.98);
}

.cannon-path {
  fill: none;
  stroke: rgba(232, 105, 150, 0.88);
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cannon-path.is-preview {
  stroke-dasharray: 5 5;
  stroke: rgba(255, 182, 210, 0.95);
  stroke-width: 1.75;
}

.cannon-path.is-done {
  stroke-dasharray: 4 6;
  stroke: rgba(232, 140, 175, 0.95);
  stroke-width: 2;
}

.cannon-impulse {
  fill: none;
  stroke: #fff;
  stroke-width: 2.25;
  stroke-linecap: round;
}

.cannon-impulse-head {
  fill: #e86996;
  stroke: #fff;
  stroke-width: 1;
}

.cannon-impact-hint {
  fill: rgba(255, 255, 255, 0.15);
  stroke: #ffb6d2;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.cannon-emoji-marker {
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

/* Geolocation pad: invisible hit target over the SVG eye (EPIC shows through). */
.cannon-pad-hit {
  position: absolute;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1.5px solid rgba(255, 182, 210, 0.35);
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  z-index: 2;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  color: transparent;
  background: transparent;
  box-shadow: none;
  user-select: none;
  -webkit-user-select: none;
}

.cannon-pad-hit:active {
  cursor: grabbing;
  transform: scale(0.96);
}

.cannon-pad-hit[hidden] {
  display: none !important;
}

.cannon-emoji-marker.is-blur {
  filter: blur(0.6px) drop-shadow(0 0 2px rgba(255, 140, 180, 0.35));
}

.cannon-emoji-marker.is-flying {
  filter: drop-shadow(0 0 4px rgba(255, 160, 190, 0.65));
}

.cannon-emoji-marker.is-settled {
  filter: drop-shadow(0 0 5px rgba(255, 150, 185, 0.55));
}

.cannon-emoji-marker.is-impact {
  filter: drop-shadow(0 0 8px rgba(255, 170, 200, 0.85));
}

/* —— Emoji picker sheet (body-mounted; above playback chrome) —— */
.cannon-emoji-sheet {
  position: fixed;
  bottom: 72px;
  width: min(340px, calc(100% - 24px));
  max-height: min(42vh, 360px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: rgba(28, 16, 28, 0.94);
  color: #fdeef5;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  z-index: 200;
  overflow: hidden;
}

.cannon-emoji-sheet--right {
  right: 16px;
  left: auto;
  transform: none;
}

.cannon-emoji-sheet--left {
  left: 16px;
  right: auto;
  transform: none;
}

.cannon-emoji-sheet[hidden] {
  display: none !important;
}

.cannon-emoji-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  font: 600 13px/1.2 "Segoe UI", system-ui, sans-serif;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.cannon-emoji-close {
  border: none;
  background: transparent;
  color: #fdeef5;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.cannon-emoji-sheet-body {
  overflow-y: auto;
  padding: 8px 10px 12px;
  -webkit-overflow-scrolling: touch;
}

.cannon-emoji-cat-label {
  margin: 8px 2px 4px;
  font: 600 11px/1.2 "Segoe UI", system-ui, sans-serif;
  color: rgba(255, 200, 220, 0.85);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cannon-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}

.cannon-emoji-cell {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1.35;
  padding: 4px 0;
  border-radius: 8px;
  cursor: pointer;
}

.cannon-emoji-cell:hover,
.cannon-emoji-cell.is-selected {
  background: rgba(232, 105, 150, 0.28);
}

/* Opposite the app menu so chips stay clear of the hamburger / toggle. */
.cannon-filter {
  position: absolute;
  top: 10px;
  display: flex;
  gap: 4px;
  z-index: 2;
  pointer-events: auto;
  opacity: 1;
}

.cannon-filter--left {
  left: 10px;
  right: auto;
}

.cannon-filter--right {
  right: 10px;
  left: auto;
}

.cannon-filter[hidden] {
  display: none;
}

.cannon-filter-btn {
  padding: 5px 9px;
  border: 1px solid rgba(255, 200, 220, 0.35);
  border-radius: 8px;
  background: rgba(40, 20, 35, 0.72);
  color: #fdeef5;
  font: 11px/1.2 "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
}

.cannon-filter-btn.is-active {
  background: rgba(232, 105, 150, 0.45);
  border-color: rgba(255, 200, 220, 0.7);
}

.cannon-toast {
  position: fixed;
  top: max(56px, calc(var(--menu-corner-height, 56px) + 8px));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(340px, calc(100vw - 24px));
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(40, 20, 35, 0.92);
  color: #fdeef5;
  font: 13px/1.35 "Segoe UI", system-ui, sans-serif;
  pointer-events: none;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 200, 220, 0.25);
  opacity: 1;
}

.cannon-toast[hidden] {
  display: none !important;
}

.cannon-toast-line {
  overflow-wrap: anywhere;
}

.cannon-toast-dest {
  color: #ffb6d2;
  font-weight: 700;
}

.cannon-toast-nums {
  opacity: 0.88;
  font-size: 11px;
}

.cannon-online-eye.is-meet .cannon-eye-sclera {
  filter: drop-shadow(0 0 2.5px rgba(255, 220, 90, 0.75));
}

.cannon-eye-sclera {
  pointer-events: none;
}

.cannon-emoji-marker.is-iris {
  paint-order: stroke fill;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.35));
}

.cannon-emoji-marker.is-photo-badge {
  paint-order: stroke fill;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.65));
}

.cannon-online-eye.has-photo .cannon-eye-photo {
  pointer-events: none;
}

/* Leave room for filter chips above the status HUD when filters share the left. */
#cannonOverlay.is-active.cannon-filters-left .cannon-hud {
  top: 42px;
}

#cannonOverlay.is-active.cannon-filters-right .cannon-hud {
  top: 10px;
}

@media (max-width: 640px), (max-height: 520px) {
  .cannon-emoji-sheet {
    bottom: 56px;
    max-height: min(38vh, 300px);
  }

  .cannon-emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }

  .cannon-filter--left {
    left: 8px;
  }

  .cannon-filter--right {
    right: 8px;
  }

  .cannon-toast {
    top: max(48px, calc(var(--menu-corner-height, 56px) + 8px));
    max-width: calc(100vw - 24px);
  }

  #cannonOverlay.is-active .cannon-hud {
    right: 10px;
    max-width: calc(100% - 20px);
  }
}
