.grocery-item {
  grid-template-columns: 29px minmax(140px, 1fr) minmax(96px, 115px) auto;
  gap: 12px;
  padding: 14px 16px;
}

.cold-last-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  color: var(--ink);
  font: 700 11px "DM Sans", sans-serif;
  cursor: pointer;
  white-space: nowrap;
}

.cold-last-toggle input {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #8e9a94;
  border-radius: 5px;
  background: var(--paper);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.cold-last-toggle input:checked {
  border-color: var(--ink);
  background: var(--ink);
}

.cold-last-toggle input:checked::after {
  content: "✓";
  color: white;
  font: 800 12px/1 Manrope;
}

.cold-last-toggle:has(input:checked) {
  background: rgba(201,236,114,.38);
  border-color: rgba(118,168,62,.55);
}

.item-name {
  min-width: 0;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.item-controls .item-edit {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.55);
  font-size: 11px;
}

.item-controls .save-staple,
.item-controls .delete {
  width: 32px;
  height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.item-controls .save-staple:hover,
.item-controls .delete:hover {
  background: rgba(23,55,43,.06);
}

@media (max-width: 700px) {
  .route-actions .cold-last-toggle {
    justify-content: center;
    font-size: 11px;
  }

  .dept-head {
    padding: 13px 14px;
  }

  .grocery-item {
    grid-template-columns: 28px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 11px;
    row-gap: 9px;
    padding: 14px;
  }

  .grocery-item .check {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 24px;
    height: 24px;
    margin-top: 1px;
  }

  .grocery-item .item-name {
    grid-column: 2;
    grid-row: 1;
    font-size: 16px;
    line-height: 1.3;
  }

  .grocery-item .dept-select {
    display: none;
  }

  .grocery-item .item-controls {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .item-controls .quantity-stepper {
    margin-right: auto;
  }

  .item-controls .item-edit,
  .item-controls .save-staple,
  .item-controls .delete {
    min-height: 34px;
  }

  .mobile-draft-row {
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 14px;
  }

  .mobile-draft-row .draft-check {
    width: 24px;
    height: 24px;
    margin-top: 1px;
  }

  .draft-item-content {
    min-width: 0;
    display: grid;
    gap: 10px;
  }

  .mobile-draft-row .draft-item-name {
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .draft-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .draft-item-controls .quantity-stepper {
    margin-right: auto;
  }

  .mobile-draft-actions button {
    min-width: 34px;
    min-height: 34px;
    border-radius: 8px;
  }

  .mobile-draft-row .mobile-edit {
    border: 1px solid var(--line);
    background: rgba(255,255,255,.55);
    padding: 0 9px;
    font-size: 11px;
  }

  .mobile-draft-row .mobile-save,
  .mobile-draft-row .mobile-remove {
    padding: 0;
  }
}

@media (max-width: 370px) {
  .item-controls,
  .draft-item-controls {
    gap: 4px;
  }

  .item-controls .item-edit,
  .mobile-draft-row .mobile-edit {
    padding-left: 7px;
    padding-right: 7px;
  }
}
