:root {
  --bg: #111;
  --fg: #eee;
  --muted: #ddd;
  --border: #555;
  --panelBg: rgba(0, 0, 0, 0.55);
  --panelBorder: rgba(255, 255, 255, 0.15);
  --popupBg: #222;
  --flashOutline: rgba(255, 255, 255, 0.35);
  --flashShadow: rgba(255, 255, 255, 0.25);

  --canvasSize: 64px;
  /* Outer module size (border included). JS can sync it if needed. */
  --slotSize: 68px;
  --slotBorder: 2px;
}

:root[data-theme='light'] {
  --bg: #f6f7fb;
  --fg: #111;
  --muted: #222;
  --border: rgba(0, 0, 0, 0.25);
  --panelBg: rgba(255, 255, 255, 0.85);
  --panelBorder: rgba(0, 0, 0, 0.15);
  --popupBg: #fff;
  --flashOutline: rgba(0, 0, 0, 0.2);
  --flashShadow: rgba(0, 0, 0, 0.15);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  height: 100vh;
  margin: 0;
}

body.crashed #pets,
body.crashed .resetBtn,
body.crashed .farmWrap,
body.crashed .debugMenu,
body.crashed .creaturePanel {
  pointer-events: none;
  filter: blur(1px);
}

.crashOverlay.hidden {
  display: none;
}

.crashOverlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
}

:root[data-theme='light'] .crashOverlay {
  background: rgba(0, 0, 0, 0.25);
}

.crashOverlayPanel {
  width: min(420px, calc(100vw - 32px));
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  border-radius: 8px;
  padding: 12px 12px 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.crashOverlayTitle {
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  opacity: 0.95;
}

.crashOverlayMsg {
  font-size: 11px;
  opacity: 0.9;
  white-space: pre-wrap;
}

.title {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  letter-spacing: 2px;
  color: var(--muted);
  opacity: 0.9;
  text-align: center;
  line-height: 1.1;
}

.subtitle {
  font-size: 11px;
  letter-spacing: 1px;
  opacity: 0.75;
  margin-top: 4px;
}

.pets {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: center;
  flex-wrap: wrap;
  padding: 16px;
  max-width: calc(100vw - 32px);
}

.petCard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* Reserve a consistent bottom area so add-slot and pets stay vertically aligned */
.controls {
  height: 28px;
  width: var(--slotSize);
  display: flex;
  align-items: center;
  justify-content: center;
}

.petName {
  font-size: 12px;
  text-align: center;
  line-height: 1.1;
  /* Enough for name + stage line so add-slot aligns */
  min-height: 30px;
}

.stage {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 2px;
}


body.ownerPromptActive #pets,
body.ownerPromptActive .resetBtn,
body.ownerPromptActive .farmCard,
body.ownerPromptActive .farmBonusHud,
body.ownerPromptActive .debugMenu,
body.ownerPromptActive .creaturePanel {
  pointer-events: none;
  filter: blur(1px);
}

.eggPicker {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

:root[data-theme='light'] .eggPicker {
  background: rgba(0, 0, 0, 0.25);
}

body.eggPickerActive #pets,
body.eggPickerActive .resetBtn,
body.eggPickerActive .farmCard,
body.eggPickerActive .farmBonusHud,
body.eggPickerActive .debugMenu,
body.eggPickerActive .creaturePanel {
  pointer-events: none;
  filter: blur(1px);
}

.eggPickerPanel {
  width: min(560px, calc(100vw - 32px));
  max-height: min(70vh, 520px);
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  color: var(--fg);
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.eggPickerTitle {
  font-size: 12px;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.eggPickerViews {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.eggPickerView.hidden {
  display: none;
}

.eggPickerGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

@media (min-width: 720px) {
  .eggPickerGrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.eggPickerEgg {
  padding: 8px 10px;
  font-family: monospace;
  font-size: 11px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
  text-align: left;
  border-radius: 4px;
}

.eggPickerEgg:hover {
  outline: 1px solid var(--flashOutline);
}

.eggPickerEgg:focus-visible {
  outline: 2px solid var(--flashOutline);
  outline-offset: 1px;
}

.eggPickerDetailHeader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.eggPickerDetailTitle {
  font-size: 11px;
  opacity: 0.85;
  text-align: center;
  letter-spacing: 1px;
}

.eggPickerDetailBody {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px;
  align-items: start;
  padding: 6px 2px 2px;
}

.eggPickerIcon {
  width: 64px;
  height: 64px;
  border: 1px solid var(--panelBorder);
  background: rgba(0, 0, 0, 0.15);
}

:root[data-theme='light'] .eggPickerIcon {
  background: rgba(0, 0, 0, 0.06);
}

.eggPickerLine {
  font-size: 11px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.eggPickerRow {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.eggPickerBtn {
  padding: 5px 10px;
  font-size: 11px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
  border-radius: 4px;
  min-width: 84px;
}

.eggPickerBtnPrimary {
  border-color: var(--flashOutline);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.eggPickerBtn:focus-visible {
  outline: 2px solid var(--flashOutline);
  outline-offset: 1px;
}
.ownerPrompt {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
}

:root[data-theme='light'] .ownerPrompt {
  background: rgba(0, 0, 0, 0.25);
}

.ownerPromptPanel {
  width: min(420px, calc(100vw - 32px));
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  color: var(--fg);
  padding: 12px 12px 10px;
  box-sizing: border-box;
}

.ownerPromptTitle {
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.ownerPromptHint {
  font-size: 10px;
  opacity: 0.75;
  margin-bottom: 8px;
}

.ownerPromptInput {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-family: monospace;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--panelBorder);
  outline: none;
}

.ownerPromptRow {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.ownerPromptBtn {
  padding: 5px 10px;
  font-size: 11px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
}

.ownerPromptError {
  margin-top: 8px;
  font-size: 10px;
  color: #ff6b6b;
  min-height: 12px;
}

canvas {
  image-rendering: pixelated;
  border: 0;
  display: block;
  width: var(--canvasSize);
  height: var(--canvasSize);
  margin: 0 auto;
}

.screenWrap {
  position: relative;
  width: var(--slotSize);
  height: var(--slotSize);
  box-sizing: border-box;
  border: var(--slotBorder) solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hud {
  position: absolute;
  left: 4px;
  top: 4px;
  font-size: 10px;
  opacity: 0.85;
  background: var(--panelBg);
  padding: 2px 4px;
  border: 1px solid var(--panelBorder);
  pointer-events: none;
  white-space: nowrap;
}

.hud.hidden {
  opacity: 0;
}

.evoFlash {
  outline: 2px solid var(--flashOutline);
  box-shadow: 0 0 12px var(--flashShadow);
}

button {
  padding: 6px 12px;
  font-family: monospace;
  cursor: pointer;
}

.clickableCreature {
  cursor: pointer;
}

.petCard.dead {
  opacity: 0.7;
}

/* Hatch button anchored to the same module box as the screen */
.hatchBtn {
  width: var(--slotSize);
  box-sizing: border-box;
  padding-left: 0;
  padding-right: 0;
  text-align: center;
  display: block;
  margin: 0 auto;
}

.resetBtn {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 10;
}

.resetBtn.confirmReset {
  background: #b00020;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

:root[data-theme='light'] .resetBtn.confirmReset {
  border-color: rgba(0, 0, 0, 0.25);
}

.saveIndicator {
  position: fixed;
  right: 12px;
  top: 12px;
  z-index: 25;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  padding: 6px 8px;
  font-size: 11px;
  color: var(--fg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear;
  white-space: nowrap;
}

.saveIndicator.show {
  opacity: 0.9;
}

.saveIndicator.error {
  border-color: rgba(255, 77, 109, 0.7);
}

.addSlot {
  position: relative;
  width: var(--slotSize);
  height: var(--slotSize);
  box-sizing: border-box;
  border: var(--slotBorder) dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}

.addSlot:hover {
  border-color: var(--muted);
}

.plus {
  font-size: 28px;
  line-height: 1;
  color: #aaa;
}

.limitPopup {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  background: var(--popupBg);
  border: 1px solid var(--border);
  padding: 6px 8px;
  font-size: 11px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms linear;
}

.limitPopup.show {
  opacity: 1;
}

.debugMenu {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 20;
  min-width: 120px;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  padding: 6px 8px;
  font-size: 11px;
  color: var(--fg);
  user-select: none;
}

.debugMenu .debugLog,
.debugMenu .debugDump {
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
  cursor: text;
}

.debugThemeRow {
  margin-top: 4px;
  display: flex;
  gap: 6px;
}

.debugThemeBtn {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
}

.debugThemeBtn.active {
  background: rgba(255, 255, 255, 0.12);
}

/* --- Farm --- */
.farmCard {
  position: relative;
  width: fit-content;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28);
  user-select: none;
}

.farmWrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 12px;
  width: min(calc(100vw - 24px), 920px);
  max-width: calc(100vw - 24px);
}

.farmTooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  color: var(--fg);
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

.farmHeader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.farmTitle {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.9;
}

.farmInv {
  font-size: 10px;
  opacity: 0.85;
  white-space: nowrap;
}

.farmGrid {
  display: grid;
  /* Larger, mobile-friendly cells */
  --farmCell: clamp(34px, 7.2vw, 48px);
  --farmGap: clamp(5px, 1.2vw, 10px);
  grid-template-columns: repeat(9, var(--farmCell));
  grid-template-rows: repeat(5, var(--farmCell));
  gap: var(--farmGap);
  touch-action: none;
}

.farmCell {
  width: var(--farmCell);
  height: var(--farmCell);
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--panelBorder);
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 3vw, 18px);
  line-height: 1;
}

:root[data-theme='light'] .farmCell {
  background: rgba(0, 0, 0, 0.03);
}

.farmCell:hover {
  outline: 1px solid var(--flashOutline);
}

.farmCell:focus-visible {
  outline: 2px solid var(--flashOutline);
  outline-offset: 1px;
}

.farmToolCell {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
}

:root[data-theme='light'] .farmToolCell {
  background: rgba(0, 0, 0, 0.05);
}

.farmToolCell.selected {
  outline: 2px solid var(--flashOutline);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.farmPlotCell.state-planted {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.farmPlotCell.state-watered {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.farmPlotCell.state-grown {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 0 10px rgba(255, 255, 255, 0.05);
}

.farmBonusHud {
  position: relative;
  z-index: 5;
  width: 56px;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  border-radius: 6px;
  padding: 8px 6px 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  opacity: 0.9;
}

.farmBonusHud:not(.active) {
  opacity: 0.55;
}

.farmBonusGrid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(5, 18px);
  gap: 4px;
}

.farmBonusCell {
  border: 1px solid var(--panelBorder);
  border-radius: 4px;
  background:
    repeating-linear-gradient(to right, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 8px),
    rgba(255, 255, 255, 0.03);
}

:root[data-theme='light'] .farmBonusCell {
  background:
    repeating-linear-gradient(to right, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.06) 0 1px, transparent 1px 8px),
    rgba(0, 0, 0, 0.03);
}

.farmBonusCell.on {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* Top (full) -> green, middle -> orange, bottom (low) -> red */
.farmBonusCell.on:nth-child(1),
.farmBonusCell.on:nth-child(2) {
  background-color: rgba(70, 220, 120, 0.55);
}
.farmBonusCell.on:nth-child(3) {
  background-color: rgba(255, 165, 60, 0.55);
}
.farmBonusCell.on:nth-child(4),
.farmBonusCell.on:nth-child(5) {
  background-color: rgba(255, 70, 70, 0.55);
}

:root[data-theme='light'] .farmBonusCell.on:nth-child(1),
:root[data-theme='light'] .farmBonusCell.on:nth-child(2) {
  background-color: rgba(40, 170, 90, 0.45);
}
:root[data-theme='light'] .farmBonusCell.on:nth-child(3) {
  background-color: rgba(240, 150, 40, 0.45);
}
:root[data-theme='light'] .farmBonusCell.on:nth-child(4),
:root[data-theme='light'] .farmBonusCell.on:nth-child(5) {
  background-color: rgba(230, 60, 60, 0.45);
}

.farmBonusValue {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.9;
  text-align: center;
}

@media (max-width: 520px) {
  .farmWrap {
    gap: 10px;
    align-items: stretch;
  }
  .farmBonusHud {
    width: 54px;
  }
  .farmBonusGrid {
    grid-template-rows: repeat(5, 22px);
  }
}

:root[data-theme='light'] .debugThemeBtn.active {
  background: rgba(0, 0, 0, 0.08);
}

.debugMenuHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  letter-spacing: 1px;
  opacity: 0.9;
  cursor: pointer;
}

.debugMenuBody {
  margin-top: 6px;
  opacity: 0.9;
  white-space: nowrap;
}

.debugLog {
  margin-top: 6px;
  padding: 6px 6px;
  border: 1px solid var(--panelBorder);
  max-height: 22vh;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 10px;
  opacity: 0.95;
}

.debugDump {
  margin-top: 6px;
  width: 100%;
  min-width: 260px;
  max-width: 420px;
  height: 140px;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 10px;
  color: var(--fg);
  background: transparent;
  border: 1px solid var(--panelBorder);
  padding: 6px;
  display: none;
}

.debugDump.show {
  display: block;
}

.debugSectionTitle {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.7;
}

.debugPetsList {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 40vh;
  overflow: auto;
  padding-right: 4px;
}

.debugPetRow {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.debugPetRow.dead {
  opacity: 0.65;
}

.debugPetRow.dead .debugPetName {
  text-decoration: line-through;
}

.debugPetLine {
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.debugPetId {
  opacity: 0.75;
}

.debugPetName {
  opacity: 0.95;
}

.debugPetMeta {
  opacity: 0.7;
}

.debugPetHud {
  opacity: 0.85;
}

.debugMenu.collapsed .debugMenuBody {
  display: none;
}

.clock {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 20;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  padding: 6px 8px;
  font-size: 11px;
  color: var(--fg);
  opacity: 0.85;
  white-space: nowrap;
}

.creaturePanel {
  position: fixed;
  left: 12px;
  top: 56px;
  bottom: 48px;
  z-index: 15;
  width: 320px;
  display: flex;
  background: var(--panelBg);
  border: 1px solid var(--panelBorder);
  color: var(--fg);
  backdrop-filter: blur(2px);
}

.creaturePanel.hidden {
  display: none;
}

.creaturePanelMenu {
  width: 96px;
  border-right: 1px solid var(--panelBorder);
  padding: 8px;
  box-sizing: border-box;
}

.creaturePanelTitle {
  font-size: 10px;
  letter-spacing: 1px;
  opacity: 0.7;
  margin-bottom: 8px;
}

.creaturePanelMenuItem {
  padding: 6px 6px;
  border: 1px solid transparent;
  opacity: 0.85;
  cursor: pointer;
  user-select: none;
}

.creaturePanelMenuItem:hover {
  border-color: var(--panelBorder);
}

.creaturePanelMenuItem.active {
  border-color: var(--panelBorder);
  opacity: 1;
}

.creaturePanel.deadLocked {
  filter: grayscale(1);
}

.creaturePanelMenuItem.disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.creaturePanelContent {
  flex: 1;
  padding: 8px 10px;
  box-sizing: border-box;
  overflow: auto;
}

.creaturePanelSection.hidden {
  display: none;
}

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

.creaturePanelName {
  font-size: 12px;
  letter-spacing: 1px;
}

.creaturePanelClose {
  padding: 2px 8px;
  line-height: 1;
  font-size: 14px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.creaturePanelRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--panelBorder);
}

.creaturePanelLabel {
  opacity: 0.75;
}

.creaturePanelValue {
  opacity: 0.95;
}

.creaturePanelStats {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--panelBorder);
  font-size: 10px;
  line-height: 1.25;
  white-space: pre-line;
  opacity: 0.9;
}

.foodHearts {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  font-size: 14px;
  line-height: 1;
  user-select: none;
}

.foodHeart {
  opacity: 0.25;
  color: #ff4d6d;
}

.foodHeart.full {
  opacity: 1;
}

.foodHeart.half {
  opacity: 0.6;
}

.foodHeart.bonus {
  color: #ffd166;
}

.foodControls,
.sleepControls,
.creaturePanelControls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.foodFeedBtn,
.creaturePanelBtn {
  padding: 4px 8px;
  font-size: 11px;
  border: 1px solid var(--panelBorder);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.foodFeedBtn.disabled,
.creaturePanelBtn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.foodInfo,
.creaturePanelHint {
  font-size: 10px;
  opacity: 0.75;
  text-align: right;
}

.foodMsg,
.creaturePanelMsg {
  margin-top: 8px;
  font-size: 10px;
  opacity: 0;
  transition: opacity 120ms linear;
  min-height: 12px;
}

.wasteLayer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
}

.wastePile {
  position: fixed;
  width: 48px;
  height: 48px;
  padding: 0;
  background: transparent;
  border-radius: 2px;
  cursor: pointer;
  pointer-events: auto;
  border: none;
  overflow: visible;
  animation: wastePileBob 1.4s ease-in-out infinite;
}

.wastePile:focus {
  outline: 1px dashed #fff;
  outline-offset: 1px;
}

.wasteStink {
  position: absolute;
  width: 5px;
  height: 3px;
  background: #fff;
  opacity: 0.7;
  animation: wasteStinkFloat 1.2s linear infinite;
}

.wasteStinkA {
  left: 12px;
  top: -6px;
  animation-delay: 0s;
}

.wasteStinkB {
  left: 30px;
  top: -14px;
  animation-delay: 0.3s;
}

.wasteSpriteWrap {
  position: absolute;
  width: 16px;
  height: 16px;
  top: 8px;
  left: 6px;
  transform: scale(3);
  transform-origin: top left;
}

.wasteSpriteOutline,
.wasteSprite,
.wasteSpriteAccent {
  position: absolute;
  width: 1px;
  height: 1px;
  top: 0;
  left: 0;
}

.wasteSpriteOutline {
  background: transparent;
  color: #000;
  box-shadow:
    3px 12px, 4px 12px, 5px 12px, 6px 12px, 7px 12px, 8px 12px, 9px 12px, 10px 12px, 11px 12px,
    3px 11px, 4px 11px, 5px 11px, 6px 11px, 7px 11px, 8px 11px, 9px 11px, 10px 11px, 11px 11px,
    4px 10px, 5px 10px, 6px 10px, 7px 10px, 8px 10px, 9px 10px, 10px 10px,
    4px 9px, 5px 9px, 6px 9px, 7px 9px, 8px 9px, 9px 9px, 10px 9px,
    5px 8px, 6px 8px, 7px 8px, 8px 8px, 9px 8px,
    5px 7px, 6px 7px, 7px 7px, 8px 7px, 9px 7px,
    6px 6px, 7px 6px, 8px 6px,
    6px 5px, 7px 5px, 8px 5px,
    7px 4px, 8px 4px;
}

.wasteSprite {
  background: transparent;
  color: #5a3a22;
  box-shadow:
    4px 11px, 5px 11px, 6px 11px, 7px 11px, 8px 11px, 9px 11px, 10px 11px,
    4px 10px, 5px 10px, 6px 10px, 7px 10px, 8px 10px, 9px 10px, 10px 10px,
    5px 9px, 6px 9px, 7px 9px, 8px 9px, 9px 9px,
    5px 8px, 6px 8px, 7px 8px, 8px 8px, 9px 8px,
    6px 7px, 7px 7px, 8px 7px,
    6px 6px, 7px 6px, 8px 6px,
    7px 5px, 8px 5px;
}

.wasteSpriteAccent {
  background: transparent;
  color: #6b4528;
  box-shadow:
    6px 11px, 7px 11px, 8px 11px,
    6px 10px, 7px 10px, 8px 10px,
    6px 9px, 7px 9px,
    7px 8px,
    7px 6px;
}

.wastePile,
.wasteSpriteOutline,
.wasteSprite,
.wasteSpriteAccent {
  transform: translateZ(0);
}

@keyframes wasteStinkFloat {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }
  70% {
    opacity: 0.25;
  }
  100% {
    transform: translateY(-18px);
    opacity: 0;
  }
}

@keyframes wastePileBob {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-2px);
  }
  100% {
    transform: translateY(0);
  }
}

.foodMsg.show,
.creaturePanelMsg.show {
  opacity: 0.9;
}

.creaturePanelMsg.error {
  color: #ff4d6d;
}
